object type argument blank or invalid

BigMr.C

Registered User.
Local time
Today, 17:54
Joined
Mar 1, 2005
Messages
14
I have a macro run from an autokey (F12) that uses SendTo to send the current report that's on screen to an email as an attachment. This has been working perfectly for years and all of a sudden when I hit the F12 key I get:
The Object Type argument for the action or method is blank or invalid.
It's fine to just right click the report and use Send To but this is a pain for my users who just want to hit F12 as before.

Anybody help?

Thanks
 
Any operating system upgrades or patches or service packs applied lately? Any upgrade of Access or Office lately?
 
nope nothing like that changed at all - I have other databases where it still works in the same way, only a couple of them have stopped working and there's no differences between these and the others.
 
damn found the cause of it!
Seemed that it was only doing it for some reports and not others.
All the reports I run are run from a command button and they all have a me.refresh followed by the command to open the report.
When I removed the me.refresh from the ones that wouldn't F12 / SendTo they started working!
Problem is I need a me.refresh prior to running these reports as any new data just entered on the screen needs to be refreshed/saved so the report will pick it up.
So questions now are:

1. why would a me.refresh on a command button used to open a report cause a SendTo error message, and only with some reports not others.

2. what can I use instead of me.refresh to save any just-entered data so it will appear on the report being run.
 

Users who are viewing this thread

Back
Top Bottom