Improper comma use in SQL

mlopes1

Registered User.
Local time
Today, 07:29
Joined
Sep 4, 2002
Messages
76
I have looked and looked but can not find source of "Syntax Error (comma) in query expression..."

See something I am missing, or more likely, I don't know!?

strSQL = "SELECT (Company, Description, Net_Weight, " & _
"Gross_Weight, Shelf_Life, Tariff_Fraction ) " & _
"FROM Total_List" & _
"WHERE [Company#] = Forms!lookup!slctCompany"


Any ideas? Thank you as always.

Marco
 
strSQL = "SELECT (Company, Description, Net_Weight, " & _
"Gross_Weight, Shelf_Life, Tariff_Fraction ) " & _
"FROM Total_List " & _
"WHERE [Company#] = " & Forms!lookup!slctCompany

Put a space after Total_List and include the double quote and ampersand before your form reference.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom