473,756 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3886
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.*******@gmai l.comwrote in message
news:11******** **************@ l12g2000cwl.goo glegroups.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
5395
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 there is a sample file called Ixtrasp.asp, but I could not find it in my system although I installed indexing service. I followed the steps in MSDN site to create a basic .asp query form (too long to post it here), but it always displays: No...
3
7550
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 the other is criteria for a Yes or No field. I'll focus on the Yes/No field for simplicity. If I run the query with the criteria hard coded as either "YES" or "NO", it works. In the values of the combo box in my form, I have it set as...
19
59974
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 can get one record's result by using the DLookup fuction, of course, but I want to get every record's value. To do this, I believe I need to build a recordset, but I do not know how. I've read about doing it using DAO in Access 97, but I am...
0
3028
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 open questions: How to display a resultset
4
16982
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 this error when I try to pull up my edit page to display the current database information in the form, and then edit it on click:
4
1629
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" "parameter="12ab"" "parameter="12ab" junk"
4
3101
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 "*" & !! & "*" My problem is that if someone is in there with a blank address, there
4
4586
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 reservation of available resources (laptops, beamers, etc). The MySql database queries are already in place, as is the ASP administration panel. The frontend that users will see however, still needs some work. I'm really close, but since I'm no...
3
2813
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 this general format. The LastPFProtocolStageIndex (level reached) column will always reflect the same number for the patient. Based on the number in the first column I would like the query to display the first duplicate occurance and nothing more....
0
9455
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10031
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9869
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9838
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8709
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7242
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5140
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2665
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.