jadeIT
Systems Analyst
- Local time
- Today, 16:59
- Joined
- Jul 16, 2002
- Messages
- 50
I want to filter a report by vendor. The user types in the name of the vendor in a text box, and then the code does the following:
DoCmd.OpenReport stDocName, acPreview, , "[vendorcode] = " & text1
However, I get a prompt for some reason. For example if I enter 'GEORGE' into the text box, when i try to run the report I get a input box with the word GEORGE'.
I also get the same problem if I try to explicitly code it:
DoCmd.OpenReport stDocName, acPreview, , "[vendorcode] = GEORGE"
Why is it doing this?
DoCmd.OpenReport stDocName, acPreview, , "[vendorcode] = " & text1
However, I get a prompt for some reason. For example if I enter 'GEORGE' into the text box, when i try to run the report I get a input box with the word GEORGE'.
I also get the same problem if I try to explicitly code it:
DoCmd.OpenReport stDocName, acPreview, , "[vendorcode] = GEORGE"
Why is it doing this?