none
Access Error 3709

    Question

  • Hello,

    i have two access apps, one (1) is calling the other (2)

    in (1), i have a vba function which pulls data (from a odbc-connected db) and stores it in a native table in (2)

    then, (1) calls a routine to manipulate said data, finally printing it to a report

    now, in some cases i get this error 3709 "the search key was not found in any record" when doing "docmd.Openrecord" with a filter criterion. after doing some research, i thought i had the solution, and removed the memo fields' (there are some) index.

    strangeley enough the problem still exists.

    to be more specific: the calling from (1) to (2) is within a loop. running a single recordset through the loop (at least til now) never crashed.

    running the app (2) seems to run smoothly as well, but as the access-apps run within a scheduled job (evry 3 mins) the manual way is out of debate.

     

    any suggestions?

    Tuesday, July 12, 2011 12:15 PM

Answers

  • There's no such thing as `DoCmd.OpenRecord`, so we really need to see your code to know what you're talking about.

    David W. Fenton
    David Fenton Associates
    • Marked as answer by Macy Dong Thursday, July 21, 2011 7:54 AM
    Wednesday, July 13, 2011 9:18 PM
  • Correct, I missed that.

    More likely two commands.

    DoCmd.OpenForm,,,,acnormal

    DoCmd.GoToRecord,acLast

    • Marked as answer by Macy Dong Thursday, July 21, 2011 7:54 AM
    Thursday, July 14, 2011 2:55 PM

All replies

  • May we view your code?
    Tuesday, July 12, 2011 2:10 PM
  • Whenever I get an error, the first thing I do is 'Google the error'.  If you can't figure it out, based on your research, post the code here.  It sounds like a record is not loading, and that is triggering the error.  It's almost impossible to know for sure, without seeing your code or SQL. 

    Tuesday, July 12, 2011 3:12 PM
  • There's no such thing as `DoCmd.OpenRecord`, so we really need to see your code to know what you're talking about.

    David W. Fenton
    David Fenton Associates
    • Marked as answer by Macy Dong Thursday, July 21, 2011 7:54 AM
    Wednesday, July 13, 2011 9:18 PM
  • Correct, I missed that.

    More likely two commands.

    DoCmd.OpenForm,,,,acnormal

    DoCmd.GoToRecord,acLast

    • Marked as answer by Macy Dong Thursday, July 21, 2011 7:54 AM
    Thursday, July 14, 2011 2:55 PM
  • Hello Markus_strauss,

     

    Welcome to our forum.

     

    As David and KCWD said, the error has something to do with the "docmd.Openrecord”.

    Have you tried KCWD's idea?

    Using DoCmd.OpenForm,,,,acnormal or DoCmd.GoToRecord,acLast instead?

     

    If the problem persists or I misunderstood anything, please feel free to let me know.

     

    Best Regards,


    Macy Dong [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, July 15, 2011 5:43 AM