Syntax error (missing operator)

dcollard23

Registered User.
Local time
Today, 10:04
Joined
Jun 15, 2009
Messages
87
I get a Syntax error(missing operator) in query expression on the bold, part of my sql:


SELECT [Items Processed].[User Name], [Items Processed].[Type of Transaction], [Items Processed].[Policy Number], [Items Processed].Insured, [Items Processed].Underwriter, [Items Processed].Premium, [Items Processed].[Effective Date], [Items Processed].[Date Received], [Items Processed].[Target Date], [Items Processed].[Returned to UW due to Incomplete Info], [Items Processed].[Date Sent to UW], [Items Processed].[Date Received from UW], [Items Processed].[Completed Date], [Items Processed].Comments, [tblUWRegions].Region,
WHERE ((([Items Processed].[Completed Date])>=[forms]![frmViewClsdOpenItems].[txtstart] And ([Items Processed].[Completed Date])<=[forms]![frmViewClsdOpenItems].[txtend]) AND (([Items Processed].[User Name]) In ('Erin Toler','Inci Flanagan','Jacquese Hollimon','Joy Downs','Lori Jones','Lorin McGrath','Marilyn Barnes','Princess Henry','Shelly Michel')))
ORDER BY [Items Processed].[User Name], [Items Processed].[Type of Transaction];


Help!!!
Thanks in advance.
 
can you do a msgbox of this to see if it looks right

in particular i think the dates in the where clause should have ## around them - is this the problem? may even just be lacl of spaces around the <= terms
 
What I sent is what was showing in my query expression,,,,below is what's showing in my form coding on my form:

I am getting a syntax error (missing operator)

If [Forms]![frmViewClsdOpenItems].[txtStart] = [Forms]![frmViewClsdOpenItems].[txtEnd] Then
strSQL = strSQL & " Where ([Items Processed].[Completed Date] = [forms]![frmViewClsdOpenItems].[txtstart])"
Else
strSQL = strSQL & " Where ([Items Processed].[Completed Date] >=[forms]![frmViewClsdOpenItems].[txtstart] And [Items Processed].[Completed Date] <=[forms]![frmViewClsdOpenItems].[txtend])"
End If
 
It looks like there is a comma just before the where clause. Also there is no FROM.
 

Users who are viewing this thread

Back
Top Bottom