473,395 Members | 1,938 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.

Using a Union Select All option in an integer based combo box.

137 100+
What I'm trying to do is give users a selection of 'filters' on a form for them to generate a report with. For each of the filters i've also used UNION SELECT to put an (All) option in the drop down lists.

When the report opens it runs a query, so the columns are filtered depending on the value of the combo boxes, or if their value is (All) then it doesn't filter at all.

The query code for each field is like this:

Expand|Select|Wrap|Line Numbers
  1.  
  2. WHERE ((Results.BrowserUsed=Forms!ReportFilter!Browser Or Forms!ReportFilter!Browser="(All)")=True) 
(SELECT/FROM code and other fields omitted)


This works fine for all fields, except one. I have one drop down menu that is an integer based field that doesn't accept any code that I put in.

I've tried changing the query to :

Expand|Select|Wrap|Line Numbers
  1.  WHERE ((Results.BrowserUsed=Forms!ReportFilter!Browser Or Forms!ReportFilter!Browser Is Null)=True) 
but this also doesn't have any effect.

Has anyone got any idea how the code can be altered to work with integer fields?

Thanks.
Mar 18 '11 #1

✓ answered by Adam Tippelt

Nevermind, problem solved. An if statement I'd written for when the integer field was null was changing another variable which was the cause of the problem.

1 1725
Adam Tippelt
137 100+
Nevermind, problem solved. An if statement I'd written for when the integer field was null was changing another variable which was the cause of the problem.
Mar 18 '11 #2

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

Similar topics

3
by: Rich Protzel | last post by:
Hello, So my table contains say 100,000 records, and I need to group the categories in fld1 by the highest count of subcategories. Say fld1 contains categories A, B, C, D, E. All of these...
4
by: mr_burns | last post by:
hi, using javascript, how do i select an option in a combo box? i have tried looking on the internet but dont really know what i should be searching for. what i want to happen is that when a...
5
by: Harry Haller | last post by:
<select name="cboPlaces" id="cboPlaces"> <option value="3">Countryside</option> <option value="4">Forest</option> <option value="5">Mountain</option> <option value="6">Desert</option> <option...
12
by: Susan Bricker | last post by:
For those of you who have been following my posts - they all pertain to a Dog Competition Organization's Database. There are three classes that the dogs can participate: NOVICE, OPEN, and...
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...
1
by: nullGumby | last post by:
I'm trying to get a UNION of UserIDs from multiple subselects. The original query--which puts all the found UserIDs into separate columns, looks like this: ...
3
MattFitzgerald
by: MattFitzgerald | last post by:
I have a combo box on the form which is used as the criteria for a field in the query . I want to be able to run the query for a specific or all agents. I have added to the row source of the...
2
by: teser3 | last post by:
I inherited an Access 2003 database with this setup: TableOne TableOneId pocOne pocTwo 1 2 3 2 2 4 3 1 ...
7
by: php_mysql_beginer911 | last post by:
Hi .. hope someone will help i am trying to figure it out why i cannot post string "union select" every time i try to post data which content union and select .. the page doesn't get posted and...
3
by: flashvenom | last post by:
Trying to wrap my head around how a good SQL search string would work. I have three tables (two in the example below for learning) with different column names (but similar data.) I'm using aliases to...
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
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?
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.