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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I admit defeat! I'm getting a 3075

Status
Not open for further replies.

BigToeCat

Programmer
Oct 12, 2003
6
GB
I admit defeat! I'm getting a 3075 error on code below - 'Missing operator'. Any help? Thanks in advance.


strSQL = "SELECT * FROM tblRace" _
& " WHERE Date = " & Race_Date & " AND Time = " & vTime & " AND CourseNo = " & intCourseNo_Temp & ";"
 
not promising but access doesn't like spaces after the equals sign sometimes

initially I would do

strSQL = "SELECT * FROM tblRace" _
& " WHERE Date =" & Race_Date & ";"

and see if that works if it does carry on from there until all criteria are functioning



strSQL = "SELECT * FROM tblRace" _
& " WHERE Date =" & Race_Date & " AND Time =" & vTime & " AND CourseNo =" & intCourseNo_Temp & ";"

regards

Jo
 
The standard delimiter around date fields is the "#" character. The other problem is that "Date" and "Time" are reserved words so they need square brackets around them.


strSQL = "SELECT * FROM tblRace" _
& " WHERE [Date] = #" & Race_Date & "# AND [Time] = " & vTime & " AND CourseNo = " & intCourseNo_Temp & ";"

You may also need similar delimitors around "vTime" is it is a date/time field.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top