No Current Record Error, Scheduled Task

Discussion in 'Access Macros' started by Greg, Apr 1, 2010.

  1. Greg

    Greg Guest

    I am receiving the "No Current Record" error in Access 2007 for a scheduled
    task that runs a macro to send object (Report) and then close database. When
    I run the macro directly from the database it runs correctly. However, when
    it is run as a scheduled task the error appears. The error is also
    inconsistent, sometimes it runs without it and sometimes it runs with it.
    The scheduled task run command is:

    "C:\Program Files\Microsoft Office\OFFICE12\MSACCESS.EXE" "I:\Access
    Databases\Managed Care\DailyCensus.accdb" /x email

    Any help as to specifically what causes this error is greatly appreciated.

    Thanks,

    Greg
     
    Greg, Apr 1, 2010
    #1
    1. Advertisements

  2. Greg,

    The command line for your scheduled task appears to be correct.

    Can you give us the details of the 'email' macro?
     
    Steve Schapel, Apr 3, 2010
    #2
    1. Advertisements

  3. Greg

    Greg Guest

    It is basically just two actions:

    Action Arguments
    SendObject Report,YTDrevenue, PDF Format
    CloseDatabase
     
    Greg, May 5, 2010
    #3
  4. Greg,

    I don't know the reason for this problem. But the first thing I would try
    is to temporarily remove the CloseDatabase action from the macro, and see if
    you still get the error. That will help to narrow down where to look
    further for the cause.
     
    Steve Schapel, May 5, 2010
    #4
  5. Greg

    trevbogg Guest

    I'm running into the same issue. I don't have an exact cause - I tried the
    knowledge base that seemed to indicate some issue with grouping and
    calculations.

    I have another access database that I'm exporting to PDF and it works great.
    I tried to do that "simple" report and export it - same issue. (simple = no
    grouping, no calculations)

    I'm not clear if this is a number of records issue or a database
    construction issue.

    The way I solved it was to run the same type of line you are running in your
    post with a runtime version of MSAccess (downloadable from Microsoft) on a
    server.
    No issue - ran just fine.

    Running it locally on my laptop it stopps after 20 or 30 records with ERR
    being the last entry in the PDF output before it stopps.

    In some cases I seemed able to get all the information out by hitting the OK
    button.

    This is a really strange error.
     
    trevbogg, May 11, 2010
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.