clearing data in dialog box form

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,
 
P

PC Datasheet

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.
 
G

Guest

Thanks! That worked great. (sorry I didn't get reply sooner.. my computer
was down for a couple days).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top