I'm having a problem using VBA to open a report. My code uses a passed OpenArg variable to select records but it isn't working. My code is:
DoCmd.OpenReport DocName, acViewPreview, , "tblcustcall.[ExaminerID]= Arg2", acWindowNormal
No matter how I format the string the variable Arg2 is not assigned to the field [ExaminerID]. The debugger shows the correct value for Arg2. If I change Arg2 to the text DDOS2 the report is properly filtered.
Anyhelp on the formatting would be appreciated.
DoCmd.OpenReport DocName, acViewPreview, , "tblcustcall.[ExaminerID]= Arg2", acWindowNormal
No matter how I format the string the variable Arg2 is not assigned to the field [ExaminerID]. The debugger shows the correct value for Arg2. If I change Arg2 to the text DDOS2 the report is properly filtered.
