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.

Recommended Answers

All 3 Replies

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

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

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

Be a part of the DaniWeb community

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