Open Report

BenSteckler

Addicted to Programming
Local time
Today, 18:12
Joined
Oct 4, 2000
Messages
44
I have a report that is created and faxed out every time a form is completed. The problem I am having is that when they first fill out the form, and click the print button, the report is printed blank. I think this is due to the fact that the table that is linked to the form has not been updated, since I have not left the form or changed records.

Is there a simple function that will save the data to the table then allow to me to print that data with out leaving the form?

Thanks
Ben
 
when you say:
click the print button----

if you mean a command button that you have placed on your form to print the report, try the following in the OnClick event of the print button,(before calling the report):

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

hth,
al
 
ben,

as usual, Pat H. is correct...
smile.gif


DoCmd.RunCommand acCmdSaveRecord is much better, as it will have more longevity in newer access versions. i got lazy and posted code from the button wizard.

i find it odd that while a97 Help details extensively the preferred method, the command button wizard builds to the old standard!...guess part of the development team at MS missed a meeting.
frown.gif


in any case, use Pat's advice...

al
 

Users who are viewing this thread

Back
Top Bottom