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

Filtering by Checkbox, concatenated records

I have a Access 2007 database I am testing that has a series of states and check box items that are concatenated to get an overall snapshot response for the state. This concatenates the info as a series of -1 and 0 seperated by commas.

I am trying to set up a form with a check box that generates a report based on a query to filter by the check box response. In this case I have it so that if the check box is checked, it shows all states that have at least one check (contains -1), and if it is not checked it shows all nonblank fields.

Expand|Select|Wrap|Line Numbers
  1. =IIF([Forms]![Filter]![Check0]=Yes, Like "*-1*", Not "")
When I generate the report based on the query, if the check box is yes it gives only the states where there is only one record (shows a -1 or a 0) and otherwise it only shows records showing -1. I have ran the sort without the IIF statement, using Like "*-1*" and again for Not "". Both populate correctly. To me this implies the problem is with the IIF statement (or possibly the form), but I cannot find the error. I have even tried reworking using =No, <>No, =-1, =0, <>0 and they react similarly. Any help would be appreciated, thank you.

The attached file is just a basic example with a couple of the columns included and generalized.
Mar 2 '11 #1
2 2351
Adding Access 2003 version of database (and repost of 2007 version)
Attached Files
File Type: zip TestDatabase2003.zip (29.1 KB, 124 views)
File Type: zip TestDatabase2007.zip (82.3 KB, 116 views)
Mar 2 '11 #2
Went a different, probably cleaner way. As part of concatenation query, placed a column to show Y/N via IIF statement. Now easier to understand data in table and filter.
Mar 4 '11 #3

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

Similar topics

11
by: Jeremy Pridmore | last post by:
Hi All, Here's a challenge. If there is a 'one word' answer to this, i.e. the name of a built in SQL Server function I can use, that would be great! However... I have a standard 1:m...
1
by: Ian Davies | last post by:
Hello In a php file I have a drop down list with index numbers in whos default value is feed into an sql query that filters records from my database and displays them in an html table. Trouble...
3
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I...
19
by: William Wisnieski | last post by:
Hello Everyone, I have a main form with a datasheet subform that I use to query by form. After the user selects two criteria on the main form and clicks the cmdShowResults button on the main...
4
by: Kurt | last post by:
I'm using the fConcatChild function posted at http://www.mvps.org/access/modules/mdl0004.htm to return a field from the Many table of a 1:M relationship into a concatenated string. The function...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
11
by: =?Utf-8?B?UGFyYWcgR2Fpa3dhZA==?= | last post by:
Hi All, I have a large recordset to be displayed on a ASP 3.0 page. I am using recordset paging for this. For the next and previous link i am passing href as <a href=<Page URl>?page=<%=...
2
by: Ronald S. Cook | last post by:
At first, it's easy to say (have a policy) that we'll hard-code for statuscode='ACT' (or maybe instead statuscode <'INA') but I think that pigeonholes us and would cause limitations. Example: We...
10
by: Redbeard | last post by:
Hi, I am a newbie using Access 2003. I am trying to apply a filter to a form and then re-filtering that forms records again. Basically I have my main form and when I wish to filter I click a button...
2
by: =?Utf-8?B?amV6MTIzNDU2?= | last post by:
Hi ASP.Net experts I have a archived SQL Server 2000 database table with about 300,000 records, and need to display filtered data on a ASP.Net 2 web page. Basic filtering needs to be done on...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...

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.