Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub Report_Open(Cancel As Integer)
DoCmd.RunCommand acCmdPrint
End Sub
Sub OpenTheReport()
DoCmd.OpenReport "Report1", acViewPreview
DoEvents
DoCmd.RunCommand acCmdPrint
End Sub
sub OpenTheReport()
dim ReportName as string
ReportName = "MyReport"
Docmd.OpenReport ReportName, acViewPreview
' Wait until report is opened
do until (SysCmd(acSysCmdGetObjectState, acReport, ReportName) = 0)
DoEvents
Loop
DoCmd.RunCommand acCmdPrint
If MsgBox("Print now?", vbYesNo) = vbYes Then
[blue]Docmd.OpenReport ReportName, acViewPreview
' Wait until report is opened
do until (SysCmd(acSysCmdGetObjectState, acReport, ReportName) = 0)
DoEvents
Loop
DoCmd.RunCommand acCmdPrint
[/blue]
End If
[blue]Function[/blue] Report_Open()
On Error GoTo Report_Open_Error
[blue]dim ReportName as string
ReportName = "MyReport"[/blue]
Function OpenTheReport()
Dim ReportName As String
ReportName = "Report Name"
If MsgBox("Print now?", vbYesNo) = vbYes Then
DoCmd.OpenReport ReportName, acViewPreview
DoEvents
DoCmd.RunCommand acCmdPrint
End If
End Function
Private Sub cmdPrint_Click()
Call OpenTheReport ' Or what ever name you used
End Sub