reference data data defined by a foreign key

Crapaw

Wha?
Local time
Today, 10:00
Joined
Jul 2, 2004
Messages
10
Any help is appreciated, i'll try to muddle through this as succinctly as i can.
Still only on my first pot of coffee. :D

using a query to populate the contents of a combo box that references a linked table i am able to obtain all fields within a record from the linked table. contained within that record, from the linked table, is a field that contains a foreign key. without having to transfer all the information from database to database how would one reference the data that is defined by that foreign key on a form through the combo box that only references the foreign key from the combo box and display it on the form that the combo box is on?

thanks in advance
 
Thanks, i believe it is in the DLookup function. I will muddle through that.
 
From Access Help:

The next example from the Shippers table uses the form control ShipperID to provide criteria for the DLookup function. Note that the reference to the control isn't included in the quotation marks that denote the strings. This ensures that each time the DLookup function is called, Microsoft Access will obtain the current value from the control.

Dim varX As Variant
varX = DLookup("[CompanyName]", "Shippers", "[ShipperID] = " _
& Forms!Shippers!ShipperID)

Sorry to have bothered anyone who wasted their time in viewing this thread.
 

Users who are viewing this thread

Back
Top Bottom