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 / March 2006

Tip: Looking for answers? Try searching our database.

Prompting several different criteria from a form (Query by Form)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Byron - 31 Mar 2006 12:38 GMT
I'm trying to prompt several different criteria from a form (Query by Form)
and one or more of the criteria I may want to blank. I am currently using
[Forms]![formname]![controlname] in my query and a List Box on my form to
enter the criteria for the query. Do i need to add an expression in the query
or build a macro?
Byron
Rick B - 31 Mar 2006 14:32 GMT
Not sure what problem you're having with this, you look to be on the right
track.

I think that you may be having trouble getting the desired results when you
leave one of the fields blank?

If so, change your statement to:

=[Forms]![formname]![controlname] & Like "*"

or similar.

Also, if you are using several criteria for several fields, make sure you
watch the "and" and "or" conditions.  Placing all the criteria on the same
row at the bottom of the criteria grid means that each item must match.
Since you are including "blank for all" conditions, this is most likely what
you want to do.

Hope that helps,

Signature

Rick B

> I'm trying to prompt several different criteria from a form (Query by
> Form)
[quoted text clipped - 4 lines]
> or build a macro?
> Byron
Byron - 31 Mar 2006 16:08 GMT
Thank you very much Rick B, you're solution didn't work but it pointed me in
the right direction by re-writing it to:
Like "*" & [Forms]![formname]![controlname]
Thanks again!

> Not sure what problem you're having with this, you look to be on the right
> track.
[quoted text clipped - 24 lines]
> > or build a macro?
> > Byron
 
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.