Lookup in form

  • Thread starter Thread starter RW Smith
  • Start date Start date
R

RW Smith

Guest
I have a form that has a client field. There is also a client name text box on the form. Based on the code entered in client, I want to display the name from another table.

This is what is in the control source for the lookup field:

=DLookUp("[Client Name]","Client Name","[Client]= [Forms]![Work Done]![Client]")

This works for all data previously entered. When I open the form and browse through the records, it displays properly.

When I go to add a new record, however, the lookup field does not return any information. If I close the form, and then reopen it, the information is there.

Can anyone help?

Ron
 
Since when you are adding the new record, this record is not saved to the bound table yet. So you won't see the Client Name in the form.

Just save the newly entered record then press F9 to refresh the form. Now you will see the info there.
 

Users who are viewing this thread

Back
Top Bottom