I want to open a report using the name from a listbox.
I am using access 2000.
This is the code, and I can't get it to work, the error message is about the MS jet engine.
DoCmd.OpenReport stDocName, acPreview, , "[empname]=[Forms]![AIYearForm]![lstName]"
I've also tried and get missing operator message
DoCmd.OpenReport stDocName, acPreview, , "[empname]=" & Me.lstName
Help what am I doing wrong.
I am using access 2000.
This is the code, and I can't get it to work, the error message is about the MS jet engine.
DoCmd.OpenReport stDocName, acPreview, , "[empname]=[Forms]![AIYearForm]![lstName]"
I've also tried and get missing operator message
DoCmd.OpenReport stDocName, acPreview, , "[empname]=" & Me.lstName
Help what am I doing wrong.