Hi first time posting. I have been struggling with this in various forms for days. When previewing a report this works :-
[DoCmd.OpenReport stDocName, acPreview, , "Inspection_Type = Forms!InsReports.Reporttype1"]
but I want to base the report on various criteria depending on users options selection. I am using If.. Then.. Else If .. Then.. Else.. End If to select the report needed. When I join two criteria with And I get "Type Mismatch" as below :-
[DoCmd.OpenReport stDocName, acPreview, , "InspectionType = Forms!InsReports.Reporttype" And "Inspector = Forms!InsReports.InspCode1"]
Any ideas as to what I am doing wrong please
tamus
[DoCmd.OpenReport stDocName, acPreview, , "Inspection_Type = Forms!InsReports.Reporttype1"]
but I want to base the report on various criteria depending on users options selection. I am using If.. Then.. Else If .. Then.. Else.. End If to select the report needed. When I join two criteria with And I get "Type Mismatch" as below :-
[DoCmd.OpenReport stDocName, acPreview, , "InspectionType = Forms!InsReports.Reporttype" And "Inspector = Forms!InsReports.InspCode1"]
Any ideas as to what I am doing wrong please
tamus