Refresh Report

T. McConnell

Registered User.
Local time
Yesterday, 21:26
Joined
Jun 21, 2019
Messages
63
Hey all,
Ok, I am stuck again of course lol. I have my forms and reports working, however when I click on my button to load the report, the values of the fields from the form are updated to the report unless I save the record then go back to the record. I am trying to load all the values to the report from the form before saving the record.
I have tried to use the requery command on the main form to ensure all fields are updated before opening the report.
Example below is for the current button to load the Orders report, however no matter what combination I use, the report doesn't update with the values when it loads from the the click event.

Private Sub btnPrintOrder_Click()
DoCmd.OpenReport "Orders", acPreview, , "[JobID]=" & Me.JobID
End Sub

Thanks for any help :banghead:
 
Try this line first:

If Me.Dirty Then Me.Dirty = False
 
pbaldy,
Thanks a million, that did it. :)
 
Happy to help! If it's not clear, that forces a save of the displayed record.
 
You might want to add a save or close button to your main record entry and then click on the report. i have to click one of those or forward or back button to save the record. You can always go back with navigation buttons.
 

Users who are viewing this thread

Back
Top Bottom