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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter Form combo box meets Null 1

Status
Not open for further replies.

TooGoon

Technical User
Jul 8, 2003
29
US
I have a filter form for a query. The intent is to filter the query for input into a report.
It works except for one item: any value in the originating table wich has no value, ie. a box which has not been given any data. It automatically filters out data that does not contain a value. This would not be a problem except i will be having multiple filter criteria and several of the columns have nearly no data in them.

The code is like this:
Query criteria:
Like IIf(IsNull([Forms]![FilterForm:304]![cboOfficlFaze1]),[Official Phase],[forms]![FilterForm:304]![cboOfficlfaze1]) Or IIf(IsNull([Forms]![FilterForm:304]![cboOfficlFaze2]),[Official Phase],[forms]![FilterForm:304]![cboOfficlfaze2]) Or IIf(IsNull([Forms]![FilterForm:304]![cboOfficlFaze3]),[Official Phase],[forms]![FilterForm:304]![cboOfficlfaze3])

With cboOfficlFaze# being a combo box which has a set of values, including a selectable null. Its default value is null.

The combo box also has a macro which it refers to when AfterUpdate calling an
 
thread702-547491

thread705-255904

thread181-255901

You don't really mean that you have a default value of null, I hope. If you do (and I don't know how to do that), change it to zero or "" or something else but not null.

"Be the first to say what is self-evident, and you are immortal." - M. Ebner-Eschenbach
 
Thankyou but that did not work.
I did have the default value at Null, so I've tried "" at that will not function
It works when the default is Null, however it knocks out the blank fields in the sorted query.
 
Thankyou!!!
That looks like exactly what I need.
 
Do you know what exactly was the problem?

Show us the code you used, okay?

"A great many people now reading and writing would be better employed keeping rabbits." --Dame Edith Sitwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top