954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Typed incorrect or too complex to be evaluated?!

Hi, I have a simple query I've used again and again previously, but in this case it's telling me that it is too complex. I've output this sql string into a message and cannot see any problems with the syntax, I'm completely baffled with this one so any help would be greatly appreciated.

SQL = "SELECT * FROM thisQuery IN '" & path & "' WHERE thisQuery.[Score]" & operator & Score

Forms(stDocName).RecordSource = SQL


operator is a variable taken from the form's combo box of =, >, <, etc. and score is a variable taken from the other combobox of 1-5.

StephNicolaou
Posting Whiz in Training
204 posts since Nov 2007
Reputation Points: 77
Solved Threads: 18
 

The score is actually a string so teh problem lays when using the operator...Any ways around this?

StephNicolaou
Posting Whiz in Training
204 posts since Nov 2007
Reputation Points: 77
Solved Threads: 18
 

Have you tried ommitting the IN? Or if Score is a string, then make it operator & "' & Score & "'"

scudzilla
Posting Whiz in Training
277 posts since Mar 2007
Reputation Points: 27
Solved Threads: 17
 

I solved this by just comparing the ID of the Scores instead of the string value!

StephNicolaou
Posting Whiz in Training
204 posts since Nov 2007
Reputation Points: 77
Solved Threads: 18
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You