Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax error in SQL statement

Status
Not open for further replies.

ktb916

Programmer
Jan 22, 2004
76
US
Hi,

Can't see the problem with this piece of SQL statement but my query keeps crashing when i try to use it.

Code:
 strSql = strSql & "HAVING(((DatePart('" & "q" & "',[MainQA_Log]![Date]))=1 AND ((DatePart('" & "yyyy" & "',[MainQA_Log]![Date]))=2004)) "

Any ideas?

KT
 
my query keeps crashing
Any error message ?
What is the output of Debug.Print strSql ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Actually I just figured it out, one to many parentheses

Thanks for the response!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top