Sub Report_Open(Cancel As Integer) : Report Event « Access « VBA / Excel / Access / Word






Sub Report_Open(Cancel As Integer)

 
    On Error Resume Next
    DoCmd.OpenForm "frmReportDateRange", _
        WindowMode:=acDialog, _
        OpenArgs:="rptProjectBillingsbyWorkCode"
    If Not IsLoaded("frmReportDateRange") Then
        MsgBox "Criteria Form Not Successfully Loaded, " & _
            "Canceling Report"
        Cancel = True
    End If
End Sub

 








Related examples in the same category

1.Sub Report_Close()
2.Sub Report_NoData(Cancel As Integer)
3.The Page event gives you the opportunity to do something immediately before the formatted page is sent to the printer: place a border around a page
4.Report Error Event
5.Report Open event
6.Activate toolbar with DoCmd.ShowToolbar
7.Deactivate toolbar DoCmd.ShowToolbar
8.Close form without saving