A
Andre C
On a form I allow the user, via an option grouip to select a report.
I code this in a string variable called strReport.
Once I set up the SQL funciton and other stuff I have the following
code
strFilter = "[CCN-ID] " & strCCN & _
" AND [consultantID] " & strconsultant & _
" AND [PCT-ID] " & strPCT & _
" AND [DiseaseID] " & strdisease & _
" AND [Active] " & strcaseload
' Apply the filter and switch it on
With Reports![strReport]
.Filter = strFilter
.FilterOn = True
End With
VBA doesn't like the With Reports! line. It tried to find a report
actually called strReport and not the string it contains. How do I get
around this?
ACC
I code this in a string variable called strReport.
Once I set up the SQL funciton and other stuff I have the following
code
strFilter = "[CCN-ID] " & strCCN & _
" AND [consultantID] " & strconsultant & _
" AND [PCT-ID] " & strPCT & _
" AND [DiseaseID] " & strdisease & _
" AND [Active] " & strcaseload
' Apply the filter and switch it on
With Reports![strReport]
.Filter = strFilter
.FilterOn = True
End With
VBA doesn't like the With Reports! line. It tried to find a report
actually called strReport and not the string it contains. How do I get
around this?
ACC