Solved

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

Posted on 2010-11-08
3
222 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
  • 2
3 Comments
 
LVL 65

Accepted Solution

by:
rockiroads earned 500 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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