Close form after print report using command button on form

drp

Registered User.
Local time
Today, 14:45
Joined
Dec 4, 2010
Messages
16
Hi

In my databse, When I print a report using command button on form,
I want to close that form instantly i.e By Clicking Single Button Report
should be print simultaniously closing the same form

Immediate help requires

Thanks in advance
 
Your code, at the moment, probably looks something like;
Code:
    Dim stDocName As String

    stDocName = "YourReportName"
    DoCmd.OpenReport stDocName, acNormal

Simply change it to;
Code:
    Dim stDocName As String

    stDocName = "YourReportName"
    DoCmd.OpenReport stDocName, acNormal
   [B][COLOR="Red"] DoCmd.Close acForm, "YourFormName"[/COLOR][/B]
 

Users who are viewing this thread

Back
Top Bottom