Dlookup on unbound text box with where clause

mnunan

Registered User.
Local time
Today, 08:50
Joined
Apr 22, 2013
Messages
13
Hello all

Could someone please help me with the following:

Table 1 = Contacts
Relevant fields = First Name, Last Name and ID

Table 2 = All Jobs
Relevant fields = driver_id

I have a form with an unbound text box and want to display in this text box the first name and last name from the contacts table where the ID in the contacts table matches the driver_id field of the current record displayed but I just can't seem to get it to work.

Both ID and driver_id are number fields

Thanks very much in advance
 
Two ways immediately spring to mind.

Make a query based on both tables. Create your form from that query, you will automatically have the drivers names on the new form.

The other way would be to place a combo box on your form this would have to be bound to the driver id and will show either the first name or last name, you would need to decide and then have an unbound textbox to extract the other part of the name in to, from the combo box.
 
Thank you for your help. I didn't want to completely redo the form as there were other fields to consider but from your advice I went down the route of using a subform based on a query instead.

Thanks again
 

Users who are viewing this thread

Back
Top Bottom