Combine 'update' and 'open report' function

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

Guest

I would like to open a report directly from a form. I have a command button
that opens my "Results" report. However, I understand that the report does
not reflect the most recent changes until the form is closed. How would you
combine an 'update' and 'open report' function in the one command button? I
do not want the user to have to click an "Update" command button before
clicking on the command button that opens the "Results" report.
Thank you
Anneg
 
I would like to open a report directly from a form. I have a command button
that opens my "Results" report. However, I understand that the report does
not reflect the most recent changes until the form is closed. How would you
combine an 'update' and 'open report' function in the one command button? I
do not want the user to have to click an "Update" command button before
clicking on the command button that opens the "Results" report.
Thank you
Anneg

Put a line in the wizard-generated command button event procedure,
before the OpenForm line:

If Me.Dirty = True Then Me.Dirty = False

This will force a write of the current record to disk, making it
available for the report.

John W. Vinson[MVP]
 
Back
Top