Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936

    - 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.

  2. #17
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    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

  3. #18
    cloudforgiven is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Aug 2016
    Posts
    41
    What is rs!cntoflate and cntoflate field? How do i check it?

  4. #19
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    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

  5. #20
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Quote Originally Posted by cloudforgiven View Post
    What is rs!cntoflate and cntoflate field? How do i check it?
    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.

  6. #21
    cloudforgiven is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Aug 2016
    Posts
    41
    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.

  7. #22
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    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.

  8. #23
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    My point in post#4 was

    openrecordset cannot use queries with parameters
    your response

    The sql is correct because it runs on another query, which were the steps in post four that I followed
    does not indicate you have checked that

    Like micron, I don't think I can help any further

    good luck with your project

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 08-22-2015, 11:26 AM
  2. Replies: 2
    Last Post: 10-15-2014, 04:23 AM
  3. Vb-access runtime error 3001
    By bobykuriakose12 in forum Access
    Replies: 8
    Last Post: 06-12-2013, 11:33 AM
  4. Replies: 8
    Last Post: 06-18-2012, 03:49 PM
  5. Replies: 13
    Last Post: 06-12-2012, 09:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums