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

Help: Combo Box handling Null values?

Status
Not open for further replies.

ChrisJF

MIS
Jun 29, 2003
16
0
0
AU
Hi,

I am using a series of combo boxes on a form as selection criteria for a query. e.g Query criteria in QBE grid (like "*" & [Forms]![Scenario]![group] &"*")
I am using GroupBy on the SQL queries for each combo box so they does not display duplicates.
Problem seems to occur with any field which a combo box is based on which contains null values.

When I run the query and I don't select any value from a combo box, I would expect the complete dynaset to be output, but it appears to be reducing this dynaset by the number of records which contain null values.

I thought I had got around this by modifying the query criteria to be (like "*" & [Forms]![Scenario]![group] &"*" or is null),
but the problem I now encounter is that if a selection is made on the combo box, the query outputs that selection plus all the null records.

Please help, am I just not thinking clearly?

Regards
ChrisJF
 

On the link above, look especially at the accepted answer by syntx on 16 June 03.


Also, see faq701-3177 and thread701-304412 on this forum.

Let me know if this works!

"No opera plot can be sensible, for in sensible situations people do not sing." - W H Auden
 
judgehopkins,

Thanks v much. I had a quick look and have used

(Like "*" & [Forms]![7000_ManualSettle_Select_frm]![txtContractID] & "*") Or nz([Forms]![7000_ManualSettle_Select_frm]![txtContractID],"")="")

as a solution. It seems to work at the moment.

Regards
ChrisJF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top