Print Invoice Report from Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Help Please?

I have a form that is link to a report but to have the latest data on on the
form print on the report I had to manually put a "refresh" command button on
the form.
So to print I must click "refresh" then click "Print" can the form
automatically refresh on its on just before I hit the "Print" button?

Thanks again
 
Open the form in Design view, and right-click on the Print command button.
Select Properties, then the Events tab. Cursor into the OnClick field, and
click the ellipsis to the right, then Code Builder, if prompted. You will be
placed in the Visual Basic editor for this command button.

Right after the On Error... line, place the refresh code:

DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

Save and test it. When you're sure it's working, you can delete the Refresh
button.

Hope that helps.
Sprinks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top