Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-23-2019, 08:32 PM   #1
T. McConnell
Newly Registered User
 
Join Date: Jun 2019
Posts: 18
Thanks: 5
Thanked 0 Times in 0 Posts
T. McConnell is on a distinguished road
Refresh Report

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

T. McConnell is offline   Reply With Quote
Old 06-23-2019, 09:07 PM   #2
pbaldy
Wino Moderator
 
pbaldy's Avatar
 
Join Date: Aug 2003
Location: Nevada, USA
Posts: 32,954
Thanks: 13
Thanked 4,052 Times in 3,988 Posts
pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold
Re: Refresh Report

Try this line first:

If Me.Dirty Then Me.Dirty = False
__________________
Paul
Microsoft Access MVP 2007-2019

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
pbaldy is offline   Reply With Quote
The Following User Says Thank You to pbaldy For This Useful Post:
T. McConnell (06-24-2019)
Old 06-24-2019, 03:52 PM   #3
T. McConnell
Newly Registered User
 
Join Date: Jun 2019
Posts: 18
Thanks: 5
Thanked 0 Times in 0 Posts
T. McConnell is on a distinguished road
Re: Refresh Report

pbaldy,
Thanks a million, that did it.

T. McConnell is offline   Reply With Quote
Old 06-24-2019, 04:07 PM   #4
pbaldy
Wino Moderator
 
pbaldy's Avatar
 
Join Date: Aug 2003
Location: Nevada, USA
Posts: 32,954
Thanks: 13
Thanked 4,052 Times in 3,988 Posts
pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold
Re: Refresh Report

Happy to help! If it's not clear, that forces a save of the displayed record.
__________________
Paul
Microsoft Access MVP 2007-2019

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
pbaldy is offline   Reply With Quote
Old 07-11-2019, 10:28 AM   #5
KHallmark
Newly Registered User
 
Join Date: Jul 2019
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
KHallmark is on a distinguished road
Re: Refresh Report

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.

KHallmark is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Refresh Report (Report On top of Form) cheer Reports 2 07-01-2018 11:53 PM
Report refresh Lifeseeker Reports 3 05-13-2011 08:33 PM
SQL Refresh for a Report in VBA shamas21 Modules & VBA 4 10-26-2009 08:00 AM
Refresh Report LadyDi Forms 6 02-05-2009 07:08 AM
Refresh report arage Reports 2 06-06-2002 12:05 PM




All times are GMT -8. The time now is 08:00 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World