Syntax error

AJL
07-17-2003, 09:28 PM
I have a form in an Access database, only one form, that needs to create certificates in Word, after dropping the necessary information (name, address, ID#, etc.) in Excel. I seemed to have the hang of it, then got an error that I don't have a clue of how to fix. The error is:

"Syntax error in date in query expression '#' WHERE (((Fiem_WholesaleFood.Firm_ID)=get WholesaleFoodId(0) Or (Firm....

And it goes on from there. It is rather involved and I do not believe I can describe my problem without sending the form and code to whomever is kind enough to help me. The process was actually working, then I made a few changes and the whole thing has blown up in my face. I'm in need of emergency help, because I need to get this done TONIGHT! I'm appealing to all experts who could help - PLEASE!

Sincerely,

Zoegirl

vbfan
07-18-2003, 12:46 AM
When I understand it right do you use the wrong date format somewhere in you SQL query change it to this kind :

Dim sDate As Date
sDate = CDate(txtDate.Text)
SQL ="... = " & format(sDate,"m-d-yy") & "..."
'Change only the part where you set the date into the string

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum