View Full Version : Refresh parameters in a Report


Nmex Ron
07-06-2008, 04:01 PM
I have a report that works from a query with parameters that are entered into a small popup form.

When the user is finished viewing the report they would like to enter new parameters (Beginning and ending dates) for the report (without closing and reopening the form)

I installed a command button, which re-opens the small form to enter dates.
However, when the new dates are entered and the "Okay" button is clicked the user sees nothing happen -- UNTIL the refresh button is clicked, then the new parameters/dates show.

How /where can I put the refresh command, into the macro or query or wherever, to include the "REFRESH" command automatically when the "Okay" button is clicked?

Thanks in advance for your help.

RuralGuy
07-06-2008, 05:42 PM
The form should open the report, not the other way around.

Nmex Ron
07-06-2008, 09:21 PM
RG,

I had a misstatement saying "form" instead of "report" -- I should have said:

When the user is finished viewing the report they would like to enter new parameters (Beginning and ending dates) for the report (without closing and reopening the REPORT)
I installed a command button, which re-opens the small form to enter dates.
However, when the new dates are entered and the "Okay" button is clicked the user sees nothing happen -- UNTIL the refresh button is clicked, then the new parameters/dates show.

How /where can I put the refresh command, into the macro or query or wherever, to include the "REFRESH" command automatically when the "Okay" button is clicked?

Thanks for your reply, please try again with this correction.

Ron

RuralGuy
07-07-2008, 08:29 AM
As I stated earlier, if you always ran the report from the form instead of opening the form from the report then what you need to happen would happen. I would have both a Print and Preview button on the form.

Pat Hartman
07-07-2008, 11:42 AM
If the user isn't going to close the report, your code will need to do it for them.