If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Close form after report opens?
I have a form with a txbox to enter the date and a cmd button which opens a
report. I would like the form to automatically close when the report opens. When the user closes the report I would like the form to be closed..Thanks...Randal |
#2
|
|||
|
|||
On Wed, 24 Aug 2005 15:09:43 -0700, Randy wrote:
I have a form with a txbox to enter the date and a cmd button which opens a report. I would like the form to automatically close when the report opens. When the user closes the report I would like the form to be closed..Thanks...Randal Leave the form open while the report runs. Code the Report Close event: DoCmd.Close acForm, "FormName" When the report closes it will close the form. Pehaps a better method would be to let the report itself open the form. In addition to coding the report's Close event, as above, do the following. Code the Report Open Event: DoCmd.OpenForm "FormName", , , , , acDialog Code that command button on the form: Me.Visible = False Now all you need do is open the report (not the form). When the report opens, it will open the form. After the date has been entered in the form click the command button. The form will become not visible, and the report will display. When you close the report, it will also close the form. -- Fred Please only reply to this newsgroup. I do not reply to personal email. |
#3
|
|||
|
|||
Perfect. That was easy, Thanks a lot..
"fredg" wrote in message .. . On Wed, 24 Aug 2005 15:09:43 -0700, Randy wrote: I have a form with a txbox to enter the date and a cmd button which opens a report. I would like the form to automatically close when the report opens. When the user closes the report I would like the form to be closed..Thanks...Randal Leave the form open while the report runs. Code the Report Close event: DoCmd.Close acForm, "FormName" When the report closes it will close the form. Pehaps a better method would be to let the report itself open the form. In addition to coding the report's Close event, as above, do the following. Code the Report Open Event: DoCmd.OpenForm "FormName", , , , , acDialog Code that command button on the form: Me.Visible = False Now all you need do is open the report (not the form). When the report opens, it will open the form. After the date has been entered in the form click the command button. The form will become not visible, and the report will display. When you close the report, it will also close the form. -- Fred Please only reply to this newsgroup. I do not reply to personal email. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ECHO Causing Problems | DS | General Discussion | 5 | May 17th, 2005 02:19 AM |
Need Help In Printing Current Record in Specific Report | RNUSZ@OKDPS | Setting Up & Running Reports | 1 | May 16th, 2005 09:06 PM |
Help!! I'm running around in circles! | CathyA | New Users | 19 | December 12th, 2004 07:50 PM |
dlookup | miaplacidus | Using Forms | 9 | August 5th, 2004 09:16 PM |
auto entry into second table after update | Tony | New Users | 13 | July 9th, 2004 10:42 PM |