473,386 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

All or Filtered using a CheckBox

Access 2003

I have a form (bound to a query) and would like for the user to check
a CheckBox to filter records based on a value of one of the fields.
If the CheckBox is not checked, it should show all the records. Here
is the query criteria I am using:

IIf([forms]![frmViolations]![Check156]=True,[forms]![frmViolations]!
[txtStation],"*")

The action this line is performing:

If the checkbox on the form is checked (i.e., True), the query uses
the value of the control txtStation (That works), but if it is
unchecked, the "*" doesn't work. It returns nothing. "??" doesn't
work either.

The alternative is to use a seperate recordsource altoghether, which I
am trying to avoid. Any suggesting greatly appreciated!!!

RBolling
Feb 12 '08 #1
1 1838
On Mon, 11 Feb 2008 16:36:58 -0800 (PST), robboll wrote:
Access 2003

I have a form (bound to a query) and would like for the user to check
a CheckBox to filter records based on a value of one of the fields.
If the CheckBox is not checked, it should show all the records. Here
is the query criteria I am using:

IIf([forms]![frmViolations]![Check156]=True,[forms]![frmViolations]!
[txtStation],"*")

The action this line is performing:

If the checkbox on the form is checked (i.e., True), the query uses
the value of the control txtStation (That works), but if it is
unchecked, the "*" doesn't work. It returns nothing. "??" doesn't
work either.

The alternative is to use a seperate recordsource altoghether, which I
am trying to avoid. Any suggesting greatly appreciated!!!

RBolling
Try:
Like IIf(Forms!![frmViolations]![Check156]=True,"*",
[forms]![frmViolations]![txtStation])

The form must be open when this is run.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Feb 12 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: adam | last post by:
i'm working on a portion of a CMS that allows content-admins to browse a product list, and add individual products into the taxonomy by clicking checkboxes next to categories they might belong in....
6
by: GSteven | last post by:
(as formerly posted to microsoft.public.access.forms with no result) I've created a continuous form which is based on a straightforward table (ex - customers - 100 records). On the form there is...
3
by: deekay | last post by:
I'm using Access 2000 working in DAO at the moment and am having trouble deleting a record from a form that has been filtered. So I'm filtering a form and then when the user selects the record...
5
by: Brad | last post by:
I created a base page class which sets a response filter and the filter injects additional html into the response output stream. The filter works fine and everything works as expected except for...
7
by: Ken | last post by:
Hi All - I have a filtered GridView. This GridView has a check box in the first column. This check box is used to identify specific rows for delete operations. On the button click event I...
1
by: s26f84 | last post by:
Hey Guys Alot of articles and alot of stuff still no answer. Please help me on this one. I need to get data out of a filterred selected row !!! ... this is how my code looks like.... On...
3
by: melnhed | last post by:
---Report the current filtered records from a Form--- Hello All, I've seen this topic discussed before, but the solution described then doesn't work in my particular case. My Config: ...
0
by: Ironr4ge | last post by:
Hi everyone, By the rate its going it want be long till I start growing gray hair... but anyway.. to come to the point... I am trying to open the form "Languages" with a diffrent record...
4
by: Ironr4ge | last post by:
Hi everyone, I am trying to open the form "Languages" with a diffrent record source to the "Contacts" form where I conducted the search or filter... . I was wondering whether there was a vba...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.