fuzzygeek
Energy Ebbing
- Local time
- Today, 22:25
- Joined
- Mar 28, 2003
- Messages
- 989
Use this code as a sort of example
Function TestRpts()
Dim strRptName As String
Dim StrLimitsAre As String
Dim rptReport As Report
Set rptReport = New NameOfReport
strRptName = "NameOfReport"
StrLimitsAre = "Dept = " & """MentalWard"""
rptReport.Filter = StrLimitsAre
rptReport.FilterOn = True
DoCmd.OutputTo acOutputReport, strRptName, acFormatSNP, , True
rptReport.FilterOn = False
rptReport.Filter = ""
Set rptReport = Nothing
Debug.Print StrLimitsAre
End Function
I used this to create a snap report from one of my reports. There may be better ways to do this, but it worked.
Function TestRpts()
Dim strRptName As String
Dim StrLimitsAre As String
Dim rptReport As Report
Set rptReport = New NameOfReport
strRptName = "NameOfReport"
StrLimitsAre = "Dept = " & """MentalWard"""
rptReport.Filter = StrLimitsAre
rptReport.FilterOn = True
DoCmd.OutputTo acOutputReport, strRptName, acFormatSNP, , True
rptReport.FilterOn = False
rptReport.Filter = ""
Set rptReport = Nothing
Debug.Print StrLimitsAre
End Function
I used this to create a snap report from one of my reports. There may be better ways to do this, but it worked.