Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update/save before running macro

Status
Not open for further replies.

melaniecarr23

Programmer
May 2, 2005
79
US
I have a form, where people enter plan information. This information needs to be entered into a table before a report can be run on it.

My problem - I want to have a Calculate Plan button, where the user clicks it and the plan report is pulled for the current record's information.

The problem is - that information hasn't been "added" or saved to the plans table that the form is based upon yet - so I get errors when the report comes up because it's based off something that doesn't exist yet.

I tried saving the form, but that doesn't work. Is there a way to do this without having the person tab into the next record and using the After Update event?

Thanks,
Melanie
 
Just before the openreport line

[tt]docmd.runcommand accmdsaverecord[/tt]

Roy-Vidar
 
Thank you!!! I added this to my new plan macro, so it saves the record before running the queries, and removed the event on after update. You rock!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top