No Current Record Error Message when running MS Scheduler

IEHP1
IEHP1 used Ask the Experts™
on
Currently running A2007 (using 2000 mdb format).  Have created a simple query with three linked SQL tables.  Query has no criterias.  Created a report a report to show the data from the query.  Created a macro to sendobject (report) as an snp using outlook.  When I run the macro in access the process runs fine and opens outlook with the report as an snp attachment.  The report is composed of 5 pages.  But when I try to run the macro thru Windows Scheduled Task I get the "No Current Record." message.  I have to click ok approx 5 times in the error message and then Outlook opens with the attachment but when I open the attachment it only shows the 1st page correctly, the 2nd page shows all fields with #Error.

I have compacted/Repaired the db, I created a new db and moved the database to different servers and still get the same error message when ran from the scheduler.  

Any Ideas?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
Access 2007 relies heavily security.
Is the database in a trusted location.

A lot of these codes to do this rely on Outlook being open.
Is Outlook open when this is running?

Author

Commented:
Yes and yes
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
There may very well be a simple resolution for this...

FWIW,
What I usually do in cases like this is to make linked SQL tables, temporary static tables, by using Make table queries.

Can you test this to see if it works for you.

JeffCoachman
Acronis in Gartner 2019 MQ for datacenter backup

It is an honor to be featured in Gartner 2019 Magic Quadrant for Datacenter Backup and Recovery Solutions. Gartner’s MQ sets a high standard and earning a place on their grid is a great affirmation that Acronis is delivering on our mission to protect all data, apps, and systems.

Author

Commented:
Did that already and I still get the error message.  Like I said this message only pops up when the macro is ran using the scheduler.  I can run the macro directly from access and it works fine (ie it opens outlook and sends the message with the snp attachment)
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
Are you entering the UserName and password?

Is the box for: Run Only if logged in *unchecked*

Remember, there are many Third party Windows task schedulers as well that you can try:
http://www.nirmaltv.com/2008/10/12/schedule-tasks-and-startups-in-windows-using-firetask/
Commented:
Yes and Yes. I actaully  created a work around.  I task scheduler open the database which under autoexec opens a form and that forms call s the macro.  This is seems to work.  Thanks for your time.

Author

Commented:
I would like to give you 200 points for your time tough how do I do that?
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012
Commented:
No need really.

If you solved your own issue then you can accept your own post.
;-)

Jeff

Author

Commented:
I actaully  created a work around.  I task scheduler open the database which under autoexec opens a form and that forms call s the macro.  This is seems to work.  Thanks for your time.
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
;-)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial