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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dlook up or Join Table Help

Status
Not open for further replies.

Tech718

Technical User
Joined
Jan 24, 2008
Messages
13
Hello, i have 2 tables..company info and company posting. When a company makes a posting to the company posting table it shows only their username. I want a column in the company posting table to automatically retrieve the companies name from the companyinfo table based on the username once they have made the posting? i think i am to use dlook up but the issue is i know how to do this in a form and get the results in a field but how do i do this with tables? How do i get the result to show up in a column in the table...HELP!!!!!!!!!
 
ok i am new to this site but i am trying to do a dlookup and it looks like this

varResdNameID = DLookup("[FNAME]", "tblUNITS&PEOPLE", "[ROOMNUMBER] = '" & txtRMNUMBER.Value & "'")

but when i run the app it comes back with this error:

data type mismatch in criteria expression and i dont know why again i know this may have nothing to do with this thread but i needed help thank you in advance,

theo
 
varResdNameID = DLookup("[FNAME]", "tblUNITS&PEOPLE", "[ROOMNUMBER] = " & txtRMNUMBER.Value)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Try:

varResdNameID = DLookup("[FNAME]", "tblUNITS&PEOPLE", "[ROOMNUMBER] = " & txtRMNUMBER.Value)

But if you still have problems, do not post back in this thread, create a new thread.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top