Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / September 2005

Tip: Looking for answers? Try searching our database.

form/report problem1

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tope12 - 23 Sep 2005 21:25 GMT
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"
Douglas J. Steele - 24 Sep 2005 03:03 GMT
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")

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>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.
[quoted text clipped - 7 lines]
> If Category = "hat" Then
>      Category number= "111" OR  "222" OR "333"
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.