Refreshing a Report

  • Thread starter Thread starter Posh
  • Start date Start date
P

Posh

Guest
If the underlying data of a report has changed while it is open how do I refresh the report to show the changes? I am trying to stay away from closing it and opening it back up again. Thanks.
 
You cannot refresh a report. Once the report has been generated it is in is final state.

background info for those that want it

The REFRESH and REQUERY properties are used in forms and datasheets. The Requery can also be used on a Forms Control e.g a listbox

Examples using Me.
To use the Refresh you use
ME.Refresh
(Refresh all exisitng records to pick up changes - Will not pick up new records)

To use Requery you use
Me.Requery
(This will requery the current form and pick up any changes and any new records)

Check out the help file if you want further samples

Tip:If you are printing a report out using a button from a form and you use the form for data entry or data editing, then it is worth putting the Me.Refresh or Me.Requery into the code just before the Print command

Hope this helps
Trevor from www.accesswatch.co.uk
 
Thanks for the info. I knew I could Requery a form I just wasn't sure why I wasn't able to Requery a Report. Well one way I found to force the report to updates is to put a Filter on the Report and turn FilterOn=True .. this seems to requery the report.. then you can turn FilterOn=False... This updates the data in the report. Thanks again.
 

Users who are viewing this thread

Back
Top Bottom