I have a listbox that contains the results of a query. The left most column in the listbox is the ID (PrimaryKey) of the returned records from the query. Also on the form is a column of text boxes that display the current record. I want to be able to double click a row in the list box and have that members ID become the current record. I have tried this and it doesn't work.
CallMaster is the table
QryResultlb is the listbox
ID is the name of the primary key in the table, and leftmost column in the listbox
I get a Compile Error "Wrong number of arguments or invalid property assignment"
Thanks
Code:
If IsNull(Me.QryResultlb) Then Exit Sub
DoCmd.GoToRecord acDataForm, "CallMaster", acGoTo, , , "ID = " & Me.QryResultlb, acFormEdit, acDialog
Me.QryResultlb.Requery
Me.QryResultlb = Null
CallMaster is the table
QryResultlb is the listbox
ID is the name of the primary key in the table, and leftmost column in the listbox
I get a Compile Error "Wrong number of arguments or invalid property assignment"
Thanks