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 / Queries / February 2008

Tip: Looking for answers? Try searching our database.

Using IIf

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mike White - 10 Feb 2008 21:49 GMT
Using Access 2003, I have Table1 with fields name, Banquet50 and banquet 80
among others. Name is a text field and Banquet50 and Banquet80 are check
boxes. What I am trying to do is search the records in the table and display
the name of individuals that have Banquet50 or Banquet80 checked in a report.
I have been trying to use IIF, IS NOT NULL and OR but so far I am not having
any luck. CAn someone help me or point me in the right direction? Thanks, mike
Rick Brandt - 11 Feb 2008 00:32 GMT
> Using Access 2003, I have Table1 with fields name, Banquet50 and
> banquet 80 among others. Name is a text field and Banquet50 and
[quoted text clipped - 3 lines]
> IIF, IS NOT NULL and OR but so far I am not having any luck. CAn
> someone help me or point me in the right direction? Thanks, mike

SELECT [Name]
FROM Table1
WHERE Banquet50 = True
OR Banquet80 = True

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

mike White - 11 Feb 2008 05:24 GMT
I'm not even sure what to do with that. I was using the expression builder.
How do I use that to get a list of names that have banquet50 or banquet80
checked and then the complete record?

> > Using Access 2003, I have Table1 with fields name, Banquet50 and
> > banquet 80 among others. Name is a text field and Banquet50 and
[quoted text clipped - 8 lines]
> WHERE Banquet50 = True
> OR Banquet80 = True
John W. Vinson - 11 Feb 2008 06:50 GMT
>I'm not even sure what to do with that. I was using the expression builder.
>How do I use that to get a list of names that have banquet50 or banquet80
>checked and then the complete record?

You don't need to use the expression builder, and you don't need IIF at all.

Create a Query based on your table. Include the name field, the Banquet50
field, and the Banquet80 field (and any other fields that you want to see or
search).

On the first Criteria line under Banquet50 type

True

On the next criteria line under that (to use OR logic, since putting the
criterion on the same line would require that both boxes be checked) type
another True.

Open the query; you'll see the names that have either checkbox selected.

Signature

            John W. Vinson [MVP]

Rick Brandt - 11 Feb 2008 12:43 GMT
> I'm not even sure what to do with that. I was using the expression
> builder. How do I use that to get a list of names that have banquet50
> or banquet80 checked and then the complete record?

Open a new query, switch to SQL view, paste what I posted, then switch to design
view.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

 
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.