Click to See Complete Forum and Search --> : Microsoft JET Database Engine error '80040e14'


wide_eyed
06-01-2005, 02:25 PM
Here's the error I'm getting:

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression '4WOffRoad='Y''.

/test/customdemo.asp, line 55

Here is the code:
sub magazineTVRow(labelName, whereClause)
dim theCount, percent

RS.Open "select count(*) as [count] from catalogdata where " & whereClause & dateClause, adoCon,1,3
theCount = Rs.Fields("count")
percent = Rs.Fields("count")/totalResponses
RS.close

writeDemoRow labelName, theCount, percent

end sub
Here is where the whereClause comes from:
magazineTVRow "4 WD & Sport Utility", "4WOffRoad='Y'"
magazineTVRow "4 Wheel & Off Road", "sport='Y'"
magazineTVRow "4 Wheeler", "wheeler4='Y'"
magazineTVRow "5.0L", "L50='Y'"

Any help would be appreciated.

wide_eyed
06-01-2005, 02:48 PM
I got it.
I had to change the 4 in 4WOffRoad to four
I guess you can't use a numeric character to start off a field name in a database