I want to open a form to a record specified by the user through an input box. The control on the form that contains the number is txtProject. Here is the code I am trying to make work:
Is the data in the txtProject field a number or text data type?
Signature
Steve Schapel, Microsoft Access MVP
> I want to open a form to a record specified by the user through an input box. > The control on the form that contains the number is txtProject. Here is the [quoted text clipped - 4 lines] > > Thanks
Ok, so as far as I can make out, the code would be like this... Dim strProjNum As Long strProjNum = Inputbox("Enter project number","Project Number:") DoCmd.OpenForm "ProjectsForm", , , "[txtProject]=" & strProjNum