473,395 Members | 1,996 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,395 software developers and data experts.

Query Parameter Question - True/False Display All...

I've got a form where the user can edit the lookups available in the
database. It consists of a list box of the various categories on the
main form, a checkbox on the main form and a sub form which displays
the lookup values in a datasheet format. When a lookup values is no
longer current, the user can untick the "Active" box in the datasheet
and it will disappear (requeries the subform's recordsource query). On
the main form, I have the checkbox "Display all values", which when
ticked should allow the user to see all lookup values (active and
inactive) for each category.

After much stuffing around and going over newsgroups, I got it to work
by changing the recordsource query of the subform each time the check
box was ticked. Before doing it this way, I tried for some time to get
it to work by having the criteria in the subform's query reference the
checkbox on the main form (IIF([Form]![frmLookup]![ChkBox] = False,
True, True OR False). I could get it to display active (True) when not
ticked, and inactive (False) when ticked by using IIF statement, but
couldn't get it to display both inactive and active (True and False).
Just wondering if I was doing it incorrectly, or if there is a reason
this wouldn't work? Also, is there a better way of doing it aside from
changing the recordsource?

Cheers

Reg

Nov 27 '06 #1
1 3862
Changing the RecordSource of the form is a perfectly good solution.
That (or setting the Filter of your subform) is probably the most efficient
approach.

If the main form is unbound, you could manage without it if you prefer. Just
use a Continuous View subform and just put the filter criteria boxes into
the Form Header section. Example screenshot:
http://allenbrowne.com/ser-62.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Regnab" <p.*******@gmail.comwrote in message
news:11**********************@l12g2000cwl.googlegr oups.com...
I've got a form where the user can edit the lookups available in the
database. It consists of a list box of the various categories on the
main form, a checkbox on the main form and a sub form which displays
the lookup values in a datasheet format. When a lookup values is no
longer current, the user can untick the "Active" box in the datasheet
and it will disappear (requeries the subform's recordsource query). On
the main form, I have the checkbox "Display all values", which when
ticked should allow the user to see all lookup values (active and
inactive) for each category.

After much stuffing around and going over newsgroups, I got it to work
by changing the recordsource query of the subform each time the check
box was ticked. Before doing it this way, I tried for some time to get
it to work by having the criteria in the subform's query reference the
checkbox on the main form (IIF([Form]![frmLookup]![ChkBox] = False,
True, True OR False). I could get it to display active (True) when not
ticked, and inactive (False) when ticked by using IIF statement, but
couldn't get it to display both inactive and active (True and False).
Just wondering if I was doing it incorrectly, or if there is a reason
this wouldn't work? Also, is there a better way of doing it aside from
changing the recordsource?

Cheers

Reg

Nov 28 '06 #2

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

Similar topics

3
by: Harvey | last post by:
Hi, I try to write an asp query form that lets client search any text-string and display all pages in my web server that contain the text. I have IIS 6.0 on a server 2003. The MSDN site says...
3
by: MX1 | last post by:
I'm ready to pull the hair out of my head. I have a query with a couple of parameters that I want to get from combo boxes on a form. One parameter is a date with a dynamically calculated year and...
19
by: bdt513 | last post by:
I am trying to extract the values from a query using VBA. Specifically, I want to concatenate all the values of the "rosEmail" field from query "qselRosterEmailList" into one string (strEmails). I...
0
by: totierne | last post by:
comp.databases.ms-access, I want to know how to use Oracle views with session variables in Access. The parameterised views in access, are migrated to views with per session variables. The...
4
by: Todd Perkins | last post by:
Hello all, surprisingly enough, this is my first newsgroup post, I usually rely on google. So I hope I have enough info contained. Thank you in advance for any help! Problem: I am getting...
4
by: Martin Biddiscombe | last post by:
It's probably quite simple, but what I want is a regular expression to parse strings of the form: "parameter=12ab" "parameter=12ab foo bar" "parameter='12ab'" "parameter='12ab' biz boz"...
4
by: nicklpayne | last post by:
I have a search form with a subform that holds the results. Three text boxes are search criteria: First Name Last Name Address The criteria in the subform parameter query are like below: Like...
4
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet...
3
by: medic29 | last post by:
Hello, I have a query listed below which works but... The data below is what the query displays. There are hundreds of records I am bringing up and each one has between 3-6 entries displayed in...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.