Hey there,

I am having a little trouble with my select statement. It works grand until I but a where clause in. then I the follow error

Syntax error (missing operator) in query expression 'MacStatus where((Rating =70 ))'.


This is the string I am submitting to the DataBase .

Poplist2 = "Select Machine_ID,Make,Model,Problem,Rating,MacStatus " & "where((Rating =" & NewTime & " ));"

Can someone please help with this is might so small I i cant figure out what is wrong with it.

Thanks

Try writing it out like this, should work.

Poplist2 = "SELECT Machine_ID, Make, Model, Problem, Rating, MacStatus WHERE Rating =" & NewTime & ";"

Try writing it out like this, should work.

Poplist2 = "SELECT Machine_ID, Make, Model, Problem, Rating, MacStatus WHERE Rating =" & NewTime & ";"

Hi
Try this

Poplist2 = "SELECT Machine_ID, Make, Model, Problem, Rating, MacStatus from tablename WHERE Rating =" & NewTime & ";"

Thanks,
Paul dani

Also you need to add what table you're getting the data from:

Poplist2 = "SELECT Machine_ID, Make, Model, Problem, Rating, MacStatus FROM table1 WHERE Rating =" & NewTime & ";"

Also you need to add what table you're getting the data from:

Poplist2 = "SELECT Machine_ID, Make, Model, Problem, Rating, MacStatus FROM table1 WHERE Rating =" & NewTime & ";"

That did the trick
Thanks VERY much for that.
I think I i must he being on drugs to say I didn't spot that. But all the same I more than likley would have never seen that I forgot to but in the table i was taking the info from.


Thanks again
James

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.