- Immediately after the "strSQL=...." statement, add the line "Debug.Print StrSQL" and put a stop in the code
- copy the SQL from the immediate window to a new query
- run the query
This will tell you if your SQL is correct.
- Immediately after the "strSQL=...." statement, add the line "Debug.Print StrSQL" and put a stop in the code
- copy the SQL from the immediate window to a new query
- run the query
This will tell you if your SQL is correct.
Yes, but if it's not, the impact is that there are no records, or at least the returned records are not valid but there would still be a recordset - albeit perhaps an empty one.
This would have no bearing on the error message that an object has not been set.
Last edited by Micron; 09-23-2016 at 10:48 AM. Reason: clarification
What is rs!cntoflate and cntoflate field? How do i check it?
already suggested in post #4, together with what I suspect is the problem, but OP has not responded other than to ask me to watch the thread
It's in your code...
You're creating a recordset based on a sql statement that calls a query and filters it with a WHERE clause. If the field is not in that query, that's likely your problem.
As for how to check it, I just told you in my previous post. You've also had other suggestions that you haven't reported back on.
The sql is correct because it runs on another query, which were the steps in post four that I followed. I even re-created the form query and still the same Set rs thingy error.
Your reply does not indicate that you did as suggested with respect to checking the query for that field.
Sorry, I don't think I can help further.
My point in post#4 was
your responseopenrecordset cannot use queries with parameters
does not indicate you have checked thatThe sql is correct because it runs on another query, which were the steps in post four that I followed
Like micron, I don't think I can help any further
good luck with your project