473,320 Members | 2,048 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,320 software developers and data experts.

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

Zwoker
66
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 3619
puppydogbuddy
1,923 Expert 1GB
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
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 Expert 1GB
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
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...
1
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...
3
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...
0
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...
4
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)...
4
by: Mel | last post by:
how can i change disabled background on all form elements ?
6
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...
4
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...
5
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.