Been staring at this for ages-cant work out whats wrong with it, i have a headache and the "friday feeling" please help.
OK i have some patient records in a table and a data input form.
I want to display the list of names in a list box on another form so that when you click on a name it takes you to the correct data input form.
Here is my code:
Private Sub List0_Click()
DoCmd.OpenForm "Main Input Form", , , "[Pat ID] = " & CLng(Me.List0.Column(0)), acFormEdit
DoCmd.Close acForm, "test", acSaveYes
End Sub
Right when i click on a name in the list i get a parameter query box that says
Enter Parameter value then Pat ID
Anyone know what i have done wrong.
God i need a beer!
OK i have some patient records in a table and a data input form.
I want to display the list of names in a list box on another form so that when you click on a name it takes you to the correct data input form.
Here is my code:
Private Sub List0_Click()
DoCmd.OpenForm "Main Input Form", , , "[Pat ID] = " & CLng(Me.List0.Column(0)), acFormEdit
DoCmd.Close acForm, "test", acSaveYes
End Sub
Right when i click on a name in the list i get a parameter query box that says
Enter Parameter value then Pat ID
Anyone know what i have done wrong.
God i need a beer!