Combo Box Dependent on Table data (1 Viewer)

dark11984

Registered User.
Local time
Today, 12:49
Joined
Mar 3, 2008
Messages
129
I have an unbound form which I use to enter a parameter for a pass through query. I enter the PO# in a text box and press the command button, the pass through query then appends all records for that PO# to TblPurchaseOrderData.

I also have another table - TblAddress where I store all the suppliers different addresses.

I want a combo box on my form to display all the addresses for the vendor which has been appended to TblPurchaseOrderData.

There will be multiple records in TblPurchaseOrderData however they will all have the same value in the vendor field.

Any ideas?
 

dark11984

Registered User.
Local time
Today, 12:49
Joined
Mar 3, 2008
Messages
129
I've figured this out now :D:D. [PNOSEQ] is the PK in TblPurchaseOrderData....

Code:
SELECT TblAddress.PUAddress, TblAddress.VendorCd, TblTblAddress.Active
FROM TblAddress 
WHERE (((TblAddress.VendorCd)=DLookUp("[PNSUPP]","[TblPurchaseOrderData]","[PNOSEQ] = 1")) AND ((TblAddress.Active)=True));
 

Users who are viewing this thread

Top Bottom