form/report problem1

G

Guest

I made a form that allows the user generate a report based off the category
that they pick. When they choose a category, the category number pops up. The
button that runs the report works fine when there is only one category number
thats assigned to a category. I keep getting an error message when i try to
put and OR between the three numbers.

If Category = "hat" Then
Category number= "111" OR "222" OR "333"
 
D

Douglas J. Steele

Assuming you're trying to build a WHERE clause, you can't use Or like that.

You need either:

[Category number] = "111" OR [Category number] = "222" OR [Category
number] = "333"

or

[Category number] IN ("111", "222", "333")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top