Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Query Expression to run only when Value Entered

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
orbojeff - 20 Nov 2005 14:09 GMT
I'm using a value from an unbound Form Combo Box to limit my Query.

I'm using this expression to limit by City
Like "*" & [Forms]![frm_Search]![cmb_CITY ]& "*"

My Table contains many rows with Null Values for this Field
When I use the above expression the query does not show rows with null
values even when the Form Combo Box value is Null.

I need a query expression that will run only when there is a value in
the Form Combo Box.
If there is a value in the Form Combo Box then limit to that value
If the Form Combo Box is Null do nothing and return all rows
Rick Brandt - 20 Nov 2005 14:30 GMT
> I'm using a value from an unbound Form Combo Box to limit my Query.
>
[quoted text clipped - 9 lines]
> If there is a value in the Form Combo Box then limit to that value
> If the Form Combo Box is Null do nothing and return all rows

Try...

= [Forms]![frm_Search]![cmb_CITY ] OR [Forms]![frm_Search]![cmb_CITY ] Is Null

(assuming the only reason you were using "*" was to deal with no entry in the
form).

Signature

I don't check the Email account attached
to this message.     Send instead to...
RBrandt    at       Hunter      dot      com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.