473,657 Members | 2,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using "ALL" in form combo boxes as a query parameter

Zwoker
66 New Member
Hi Everyone,

I have a query that uses criteria from combo boxes in the form that runs it.

When I had only discrete values in the combo boxes that matched the data that was being queried, the result was great. I was getting only the records that I wanted.

As soon as I added "ALL" to the form's combo item lists I ran into trouble.

Firstly how do I make the query realise that I want every record, not just those that match the literal "ALL", and secondly, how do I handle the use of "ALL" for numeric fields?


Thanks.
Aug 2 '07 #1
3 3637
puppydogbuddy
1,923 Recognized Expert Top Contributor
Hi Everyone,

I have a query that uses criteria from combo boxes in the form that runs it.

When I had only discrete values in the combo boxes that matched the data that was being queried, the result was great. I was getting only the records that I wanted.

As soon as I added "ALL" to the form's combo item lists I ran into trouble.

Firstly how do I make the query realise that I want every record, not just those that match the literal "ALL", and secondly, how do I handle the use of "ALL" for numeric fields?


Thanks.
First, set the default value of your combo box to "*"; then follow the steps in this link:

http://www.fabalou.com/Access/Forms/...oxextrarow.asp
Aug 3 '07 #2
Zwoker
66 New Member
Thanks puppydogbuddy,

That page does address the general issue that I have, unfortunately I haven't been using any code in my solution - The combo boxes are using items I entered in their Row Source, etc... So it doesn't seem to fit my problem.

I tried implementing the general ideas from that page but I guess I didn't do so well, as it was still giving me the same issues - The alpha field I have wasn't matching anything if I chose "ALL" from the list, even though I had a (hidden) second column in the combo box that held an asterisk for the row, and was being referenced (I believe) by the criteria field in the Query.

The numeric parameter was even worse, in that it just gives a type mismatch still, when I did the same for it, and choose the "ALL".

Perhaps the problem is in the way that the query references the data from the combo box? I have named the hidden column with the asterisk against the "ALL" as the bound column for the combo box, but perhaps there is more to it? Do I need to include some sort of "Like" with the query criteria?

I'm confused. :(

Thanks for any suggestions any one has. I had hoped that this was a common thing that people would have done, to include an "ALL" option along with selectable items on their forms, and have it effective ignore that field in the query selection criteria.
Aug 5 '07 #3
puppydogbuddy
1,923 Recognized Expert Top Contributor
Please post the sql of the query you are using as the row source for your combo box. Also, please identify the bound column.
Aug 6 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
8414
by: Matt | last post by:
In ASP page, there is a "SELECT ALL" button, when user click it, it will select all checkboxes. I am not sure should I use client-side code to do that? the following is my approach but it didnt work. <script language="JavaScript"> function selectAllCheckBox() { //alert(document.addzone.c1.value); document.addzone.c1.value = "on"; } </script>
1
4647
by: Loreen | last post by:
I have been going through user groups and forums for the past 3 hours trying to figure out how to add "all" to my combo boxes. I've got two unbound comboboxes. Once only has one field "FiscalYear" and the other had two "DonationTypeID" and "DonationType". Both comboboxes have Table/Query as the control RowSourceType and I setup the RowSource through the query wizard interface. Using the instructions I found at...
3
4501
by: tobhamlet | last post by:
If one is using a query as a Row Source on a Form, is there a way to set up a blank space, or to insert the word "ALL" in a combo box that represents ALL combo box row items. The scenario is as follows. I have two combo boxes. One for COURSECODEs and one for SECTIONCODEs. I select a COURSECODE from teh 1st combo box. Then, from the 2nd combo box I want to select ALL SECTIONCODEs (associated with the COURSECODE). This is for MS Access...
0
1437
by: Budinski | last post by:
I have a subform that has a datasheet in it. In the datasheet I have multiple records. Each record has many textboxes and combo boxes. I have a particular combobox with 2 columns, Column 1 has the ID, Column 2 the description (The ID is hidden) (We will call this combobo cmbDescription). The combobox in question is dependend on a different combobox in the record (we eill call this combobox cmbCriteria) When I enter the cmbDescription I...
4
7172
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2) how to use the selection "All" as criteria for a field in a query, which is used to generate data for a report.
4
2424
by: Mel | last post by:
how can i change disabled background on all form elements ?
6
3934
by: Mark | last post by:
I first read about this in mvps.org, but the code he gives doesn't seem to work for my form. I"ll post my code below. I'd love it if someone could point out the error in my code. BTW, this is my very first time here and I will look forward to sifting through all of the posts and answers. Thanks in advance!!! I don't get an error when using the value option...but if I switch to a Table/Query, I get the following error:
4
3197
by: SteveKlett | last post by:
I have a subset of form items that I need to perform different operations on (enable/disable, clear values, change style, etc) rather than hard code the IDs or names I would like to recursively search a parent element(in my case a <table>) and search for elements of a certain type (<input>, <textarea>, etc) and perform operations on them. I've done some initial googling and found PLENTY of samples of disabling all form items, but I...
5
5005
by: nktt3514 | last post by:
I'm using a assembly to load my apllication, and now I need to list all forms in my apllication and list all controls. I have read the topic on http://bytes.com/topic/c-sharp/answers/545315-list-all-controls-inside-each-form and do like that, i only listed all form's name but i can't listed any control in any form. When i used the CreatInstance function to get the controls of the form, it always return null value. Please help me!
0
8425
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
8743
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
8522
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
7355
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
6177
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
5647
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2745
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
2
1973
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1736
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.