Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Join Date
    Jun 2008
    Posts
    9

    Unanswered:

    Message is deleted
    Last edited by 1stButterfly; 06-19-08 at 11:41.

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Please post the query SQL.

  3. #3
    Join Date
    Jun 2008
    Posts
    9
    Message is deleted
    Last edited by 1stButterfly; 06-19-08 at 11:43.

  4. #4
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151
    If you put a break point in your module where is code breaking? At what line in the module does that error appear?

    :-)Stu
    --If its free, take it for what its worth!

  5. #5
    Join Date
    Jun 2008
    Posts
    9
    message is deleted
    Last edited by 1stButterfly; 06-19-08 at 11:43.

  6. #6
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151
    OK, can you set a break point in your code at the "strManagerName = Me.Combo0" line and then click on the button that runs the code? This should then allow you to step thru the code with the F8 key and find the broken line(s).
    --If its free, take it for what its worth!

  7. #7
    Join Date
    Jun 2008
    Posts
    9
    Message deleted
    Last edited by 1stButterfly; 06-19-08 at 11:44.

  8. #8
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151
    Yes, open the code module and put your cursor on the line I mentioned above and press the F9 key. That should highlight that line in red. Go back to your form and choose your criteria and then hit the button and it should take you back to the module at that break point. If you press your F8 key it will then step thru each line of code until you get to the actual error.
    --If its free, take it for what its worth!

  9. #9
    Join Date
    Jun 2008
    Posts
    9
    Message deleted
    Last edited by 1stButterfly; 06-19-08 at 11:44.

  10. #10
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151
    Did you continue to press the F8 key? Each time you press that key it will run that particular line of code. By doing this you should be able to step thru the entire module until you find the line of code that is actually causing the error.

    Sorry I couldn't download your file, it said it would take over 3 hours!
    --If its free, take it for what its worth!

  11. #11
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    The problem is the reference to a form in the query. You can't do that in a query you run from DAO. You need to define explicit paremeters and set these using the querydef object. Google or search for it - I can't write out the solution in full now.

  12. #12
    Join Date
    Jun 2008
    Posts
    9
    Message deleted
    Last edited by 1stButterfly; 06-19-08 at 11:45.

  13. #13
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151
    OK, what was the line it was on just before it went there?
    --If its free, take it for what its worth!

  14. #14
    Join Date
    Jun 2008
    Posts
    9
    Message deleted
    Last edited by 1stButterfly; 06-19-08 at 11:45.

  15. #15
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151
    It appears to be a problem when you are opening the rstManager recordset so I'd guess something is wrong with the SQL string you created in strSQLManager. I've got to go now, good luck.

    :-)Stu
    --If its free, take it for what its worth!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •