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!

Allow Blank CBO to pull All Values to ListBox Not Working 1

Status
Not open for further replies.

Fattire

Technical User
Nov 30, 2006
127
US
My users have 3 values from a combo box to chose from which is used to isolate the data they need to a listbox. I'd like them to have the ability to retrieve all data if the combo box is blank. How can i accomplish this?

I've tried using the 'Switch', 'IIF', and 'NZ' funtions in the crieria of the query populating the data, none worked, such as:

Code:
NZ([Forms]![FRM_MAIN]![CBO_BALANCE_STATUS],((([TBL_BALANCES].[BALANCE_STATUS])="Open" Or ([TBL_BALANCES].[BALANCE_STATUS])="Closed" Or ([TBL_BALANCES].[BALANCE_STATUS])="Closed UC")))

This code above does not error out - it just doesn't provide any data to the listbox.

Any help would be appreciated.
 
=[Forms]![FRM_MAIN]![CBO_BALANCE_STATUS] OR [Forms]![FRM_MAIN]![CBO_BALANCE_STATUS] IS NULL

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV - That worked but only after I took out the default value - ty again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top