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 / General 2 / March 2007

Tip: Looking for answers? Try searching our database.

Setting a Criterion (Criteria) In a Query...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob Barnes - 19 Mar 2007 02:10 GMT
Such as....Forms!frmMain!ForLast
...to be used in a Query....

If I use a Dropdown to select something like "R - Z"
and then populate an unbound Field named "ForLast"
with...

"R" Or "S" Or "T" Or "U" Or "V" Or "W" Or "X" Or "Y" Or "Z"

....It will not work when setting that in...
ForLast = "R" Or "S" Or "T" Or "U" Or "V" Or "W" Or "X" Or "Y" Or "Z"

What is the best way to do this?

TIA - Bob
Allen Browne - 19 Mar 2007 02:31 GMT
Where is this query headed?
Is it to filter records in a form?
Or to open a filtered report?

If so, see:
   Use a multi-select list box to filter a report
at:
   http://allenbrowne.com/ser-50.html
The code is identical to buid a Filter for your form.

If it must be done in the query, it is possible to craft a VBA function so
it returns True if there is a match. See Duane Hookom's 4th example on this
page:
   http://www.access.hookom.net/Samples.htm

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Such as....Forms!frmMain!ForLast
> ...to be used in a Query....
[quoted text clipped - 11 lines]
>
> TIA - Bob
Bob Barnes - 19 Mar 2007 03:06 GMT
Allen - It's a Filtered Report.

I will read the references.

Thank you - Bob

> Where is this query headed?
> Is it to filter records in a form?
[quoted text clipped - 26 lines]
> >
> > TIA - Bob
 
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.