?
Solved

Showing all records on a Query whose criteria is from a form ComboBox List item "All"

Posted on 2010-11-08
3
Medium Priority
?
227 Views
Last Modified: 2012-05-10
I have a status ComboBox list [ViewStatus] on my form [MainForm] header which I use to restrict the records showing on this form's detail section

The Form is based on a query with Status criteria  = [Forms]![MainForm]![ViewStatus]

This works well with exact matches but I also want [ViewStatus] to allow showing  "All" records

|What is the easiest way of writing this criteria to show all records when requested?

Criteria Like "*" usually works but I can't find a way of translating All to anything that works
0
Comment
Question by:ARampton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 65

Accepted Solution

by:
rockiroads earned 2000 total points
ID: 34085641
Using * should work. Looks like you need the IIF check to determine the selection

eg

Criteria LIKE IIF( [Forms]![MainForm]![ViewStatus] = "All", "*",  [Forms]![MainForm]![ViewStatus])
0
 

Author Comment

by:ARampton
ID: 34085812
Fantastic, almost got there but had Like in front of my * instead of in front of my Iif...

Great quick response
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 34085927
no worries :)
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question