K
Katrina
I have a command that looks like...
Function PrintRep()
Dim objReport As Object
Dim objreportname As Variant
For Each objReport In CurrentProject.AllReports
If objReport.NAME = "Operators*" Then
DoCmd.OpenReport objReport.NAME, acPrint
ElseIf objReport.NAME = "Systems*" Then
DoCmd.OpenReport objReport.NAME, acPrint
End If
Next objReport
End Function
However, VBA doesn't seem to like the objreport.name = line
In case it's not obvious, I'm trying to print all reports
that start with "operators" or "Systems"
Any ideas?
Thanks
Function PrintRep()
Dim objReport As Object
Dim objreportname As Variant
For Each objReport In CurrentProject.AllReports
If objReport.NAME = "Operators*" Then
DoCmd.OpenReport objReport.NAME, acPrint
ElseIf objReport.NAME = "Systems*" Then
DoCmd.OpenReport objReport.NAME, acPrint
End If
Next objReport
End Function
However, VBA doesn't seem to like the objreport.name = line
In case it's not obvious, I'm trying to print all reports
that start with "operators" or "Systems"
Any ideas?
Thanks