Combo Box Difficulty

stampr18

Registered User.
Local time
Today, 05:23
Joined
Jan 5, 2007
Messages
23
I used this same code in another form, but it wont' work on this form. Can you see something that I am missing?

SELECT DISTINCT [TBLProduct].[Product] FROM TBLProduct WHERE ((([TBLProduct].[Manufacturer])=[FORMS]![FRMRECEIPT].[FRMRECEIPTSUBFORM]!Manufacturer)) ORDER BY [TBLProduct].[Product];
 
If Manufacturer is text:
Code:
"SELECT DISTINCT [TBLProduct].[Product] FROM TBLProduct WHERE ((([TBLProduct].[Manufacturer])='" & [FORMS]![FRMRECEIPT].[FRMRECEIPTSUBFORM]!Manufacturer & "')) ORDER BY [TBLProduct].[Product];"

If Manufacturer is a number and not text, then :
Code:
"SELECT DISTINCT [TBLProduct].[Product] FROM TBLProduct WHERE ((([TBLProduct].[Manufacturer])=" & [FORMS]![FRMRECEIPT].[FRMRECEIPTSUBFORM]!Manufacturer & ")) ORDER BY [TBLProduct].[Product];"
 

Users who are viewing this thread

Back
Top Bottom