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 / February 2008

Tip: Looking for answers? Try searching our database.

Multiple Item query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ryan.fitzpatrick3@safeway.com - 29 Feb 2008 17:23 GMT
I've read a few posts on this query and it looks like creating a table
where I input the item numbers in it and linking it to the query seems
to be a good way to get a lot of items in a query. Now what If I have
hundreds of numbers I want to look up? do I input all 100 numbers into
the table? Or what if it's like 10 numbers but I want create seperate
queries for different groups of numbers, should I have 1 table for one
group of numbers? What would be the easiest way for a novice to do
this?
Michel Walsh - 29 Feb 2008 18:56 GMT
It is easier to fill the table with just the values you need for the query
you want to run, then, empty the table and refill it with new values for a
new query.

You can, though, make a table with two columns, one column for the values,
and the second column, a kind of QueryID:

TheValues    QueryID
102                1
105                1
16                   2
17                   2
19                   2

and you can then use:

   WHERE QueryID = 1

to get 102 and 105, for a given query
and

   WHERE QueryID = 2

to get 16, 17, and 19  for another query, without having to clear the table
EACH time. Note that you may still have to clear all records where queryID=2
before running the second query, with a new set of values, though. So, that
way of doing things is more susceptible to problems than using a simpler
approach. A better solution could be to use a different table for each
query, and to call the table like:  Query1_parameters,  and
Query2_parameters  and have Query1_parameters holding parameters JUST for
Query1.

Hoping it may help,
Vanderghast, Access MVP

> I've read a few posts on this query and it looks like creating a table
> where I input the item numbers in it and linking it to the query seems
[quoted text clipped - 4 lines]
> group of numbers? What would be the easiest way for a novice to do
> this?
ryan.fitzpatrick3@safeway.com - 29 Feb 2008 20:56 GMT
Thanks, this is what I did, I came to the fact that I have to enter in
the items and I created a class and subclass for easy searching. This
made my queries run a lot faster to.

On Feb 29, 10:56 am, "Michel Walsh"
<vanderghast@VirusAreFunnierThanSpam> wrote:
> It is easier to fill the table with just the values you need for the query
> you want to run, then, empty the table and refill it with new values for a
[quoted text clipped - 43 lines]
> > group of numbers? What would be the easiest way for a novice to do
> > this?
 
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.