clearing data in dialog box form

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

Guest

I have a report that, upon opening, brings up a dialog box form to filter
beginning date and ending date. When I select the cmdRunReport command
button on the form, the report opened, but the dialog box stayed open. I
then inserted the me.visible = false to hide the dialog box. This works
great. However, since the form is just invisible and did not actually close,
the previous filtered dates are still there when I try to run the report for
a different time period. I would like the text boxes to be clear everytime I
run the report. I tried closing the form on the command button, but
obviously that didn’t work since that cancelled out running the report. I
couldn’t put it in the onOpen event of the report since the code for opening
the dialog box is in there (copied from Northwinds) so it would just open and
close the form. I also tried clearing the text boxes on the onOpen event of
the form (txtStartDate.text = “â€) but I got errors. Any suggestions?

TIA,
 
Use code in the report's open event to open the dialog. Use a button on the
dialog to set it's visible property to False. Use code in the report's close
event to close the dialog.
 
Thanks! That worked great. (sorry I didn't get reply sooner.. my computer
was down for a couple days).
 
Back
Top