Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gettin info from a second table onto a form 1

Status
Not open for further replies.

Chummly66

MIS
Feb 19, 2005
106
US
Hey guys,

I am so confused right now, I really need help from you guys.

I have two tables, Customers and Workorders. They are linked by a record id of "CustomerID"

On my workorder form, all the data on the form comes from the Workorders table. I do have the CustomerID saved and displayed. But what I also need are the customers First and Last name, as well as thier phone number showing on the workorder as well. But this is saved in a second table called Customers.

I have three unbound text boxes on the form, but cannot figure out the correct syntax or progamming to do this. Not sure if DLookup is the right choice or something else, and I have to admit, the more I search and read about dlookup, the more confused I get.

Help!! and thanks!

Richard

 
PS: This was the code I tried to have the text box return the phone number based on that customer id record:

=DLookUp("[txtCTN]","Customers","[CustomerID]=forms!frmWorkorders-NRC![CustomerID]")

All I get is #error in the box.

Thanks again!!
 
What about this ?
=DLookUp("[txtCTN]","Customers","[CustomerID]=forms![!][[/!]frmWorkorders-NRC[!]][/!]![CustomerID]")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top