You haven't ruined my day in the least. You've kept me from being bored out of my mind waiting for queries to run at work. The one on the left is a label. The one on the right is a textbox. Neither of which are listboxes, which are usually used to create a list and choose from one or more of the options.
The DLookup does not need to be used in VBA. you can insert it directly into the textbox you wish to display the data. Lets say for example, we have a query called "query1" that has a field called "Name". Also, the form has a textbox you wish to display the data in called "txtName".
Now, you go on txtName and enter in:
=DLookup("Name", "query1")
The only VBA you will need is a button you press after entering in the ID number. In the Event tab of the button's properties box, click the ... next to OnClick and the VBA window will open up looking like
Code:
Option Compare Database
Private Sub Button1_Click()
End Sub
Between the Private Sub... and End Sub enter in
Me.Requery
THATS IT! Save it and every time you enter in an ID and click the button, it should update the other fields with the proper data using DLookup.