Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter Excluding Selection

Status
Not open for further replies.

MikeCDPQ

Technical User
Sep 11, 2003
173
CA
I have a control with both values and blanks

Using the Filter Excluding Selection also filters out my records where the value is blank.

I want the filter to return all blanks and whatever is not equal to selected value.

Thanks for you suggestions !

Michel
 
While Rem is technically correct, and it sounds like you have NULL , not "blanks", per se, it's worth noting that in some situations, we need to determine whether the data in question is actually composed of numerous "blanks", e.g. the character produced by hitting the space bar ( CHR$32 ) or NULL, which is the absence of any data. Two very important things to remember about most database system are:

Blanks <> NULL
Zero <> NULL

and, I suppose, thirdly,

NULL <> ANYTHING

If your data actually does contain a bunch of BLANK characters, which I've seen before, then your filtering needs to get a little trickier.

Where FieldName = "somevalue" OR FieldName Like " " <-- {Insert a number of blanks between the quote marks that would most likely match the number of blanks actually in your data.

For example, I once had to work on a DB where someone else had cunningly replaced all the NULL 2-character state values with two blanks instead...was a head scratcher as I tried to zero in on what I thought were NULL values until I figured it out...of course, on display on a form or on a report, NULL looks suprising like BLANKS..


--------------------------------------
"For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled." - Richard P. Feynman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top