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

relationship-tables: recordset pulls ID# instead of title

Status
Not open for further replies.

rodrigosalinas

Technical User
Jun 28, 2002
4
US
I have one databse with 4 tables with relationships. When viewing data, foreign fields display the corresponding title for the corresponding ID#. My problems is when I create the recordset, it displays ID# instead of corresponding title. Is my problem relatred with the way the recodset was created or proble is relayted with the lookup seetings in access?????? any ideas.... Access 200 and macromedia Ultradev 4.
 
If you are using Visual Basic you can find the title using the DLookup function. Using the following code, place your fieldnames into my [] examples. The "TitleVar"variable will contain the value that you need

Dim TitleVar, IDNumberVar

IDNumberVar = [IDNumberField]'Place the name of the textbox that contains your ID#

TitleVar = DLookup("[TitleField]", "[TableInWhichItIsLocated],"[IDNumber] = """" & IDNumberVar & """")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top