Emailing Report from a Form

sclark

Yamo be there
Local time
Today, 03:52
Joined
Mar 1, 2007
Messages
60
I added a command button to my form to email a report called rpt_Master. The email functionality works fine. . . only one problem, when I complete the form and click the command button to email the report, the form is mailed blank (no data). If I advance the record, then come back to the record (form) I was in, the data is there when I use the email button again.

I think it comes down to saving the record to the master table somehow before I run the macro via the command button via "OnClick" and send the data. the same thing happens if I access a record via my form, change some data and try to email it. It is emailed without the updates having been effected.

Does this need some type of " If me.dirty" code to save the data to the master table without exiting or advancing the form?.
 
Correct.

That or just do a save regardless if the form is dirty or not.

-dK
 
I tried a "Save" command in the macro before the "Send Object" command to save the form first, but it didn't seem to have any effect. . .or do I need to "save" somthing else?
 
I am not sure of syntax since I do not use macros (VBA only). Perhaps someone else can help?

-dK
 
Command Button wizard?

Hi,
Whenever i used to drag a Comman Button on my form i used to get an automatic wizard that would help me decide what i want to do with the button but now suddenly i dont get it anymore. I'm not sure what happened. Is there some setting i messed up? Please help.

Thank You.
 
Do you mean by "drag" that you click on the command button icon in the toolbar, then click in your form to place and size the command button . . . this should bring up the wizard. If not, not sure what is going on.
 
Do you mean by "drag" that you click on the command button icon in the toolbar, then click in your form to place and size the command button . . . this should bring up the wizard. If not, not sure what is going on.

First of all i didn't realise i was posting the message in an existing thread. I apologise. Moderator - can you pls move this to new thread? Thanks.
sclark- Yes, thats what i mean. i dont know what happened. I used to get it before. Anyone else who might have any clue about this?
Thank you.
 

Users who are viewing this thread

Back
Top Bottom