Connecting Tech Pros Worldwide Help | Site Map

Using Tables as Parameters

  #1  
Old December 11th, 2006, 08:55 PM
jgscott3@bellsouth.net
Guest
 
Posts: n/a
I have a number of queries that require various parameters. However,
the parameters will change infrequently, so I do not want the user to
have to respond to them every time they run the queries. I am
tentatively setting up little tables to hold the parameters so they are
easily accessible to database administrators such as myself but will
not require user input every time the queries are run. My question is
whether this is the best way to accomplish my objectives?

Also, if this is a reasonable approach, I see no need to join the
"parameter tables" within the queries, as I can simply include them in
design view and incorporate the various parameters as constants.

Any thoughts on this approach or how to improve it would be
appreciated.

Thank you.

  #2  
Old December 12th, 2006, 02:45 AM
Tom van Stiphout
Guest
 
Posts: n/a

re: Using Tables as Parameters


On 11 Dec 2006 13:15:32 -0800, "jgscott3@bellsouth.net"
<jgscott3@bellsouth.netwrote:

I don't get: "I do not want the user to have to respond to them every
time they run the queries". Are you saying: after they fill out the
parameters for the first time, next time the query should
automatically use the same parameters? Why would the user want the
same parameter values every time?

I'm assuming you're talking about parameter queries like:
select * from Customers where CustomerID = [Give Customer ID:]

Perhaps you have queries like:
Select * from WorkQueue where Department = [Give Department:]
and an individual user would always enter the same Department, but
another user would always enter a different value.
If you explain more, we'll be better able to help.

-Tom.


Quote:
>I have a number of queries that require various parameters. However,
>the parameters will change infrequently, so I do not want the user to
>have to respond to them every time they run the queries. I am
>tentatively setting up little tables to hold the parameters so they are
>easily accessible to database administrators such as myself but will
>not require user input every time the queries are run. My question is
>whether this is the best way to accomplish my objectives?
>
>Also, if this is a reasonable approach, I see no need to join the
>"parameter tables" within the queries, as I can simply include them in
>design view and incorporate the various parameters as constants.
>
>Any thoughts on this approach or how to improve it would be
>appreciated.
>
>Thank you.
  #3  
Old December 12th, 2006, 12:15 PM
Ron2006
Guest
 
Posts: n/a

re: Using Tables as Parameters


Without a clearer idea of what you are trying to do, here are some
possibilities:
1) Have the queries link to the control table field.
2) have the control table be part of the query but NOT linked but a
field from it used in the criteria for the other table. Have to have
ONLY have one record in that control table.
3) Have a form bound to the fields in that table and reference that
form/fields as criteria in query.
4) Using dlookup or some such load those fields into unbound (and
possibily even hidden) fields on a form and have the queries reference
those fields as criteria.

Ron

  #4  
Old December 14th, 2006, 10:29 PM
jgscott3@bellsouth.net
Guest
 
Posts: n/a

re: Using Tables as Parameters



Ron2006 wrote:
Quote:
Without a clearer idea of what you are trying to do, here are some
possibilities:
1) Have the queries link to the control table field.
2) have the control table be part of the query but NOT linked but a
field from it used in the criteria for the other table. Have to have
ONLY have one record in that control table.
3) Have a form bound to the fields in that table and reference that
form/fields as criteria in query.
4) Using dlookup or some such load those fields into unbound (and
possibily even hidden) fields on a form and have the queries reference
those fields as criteria.
>
Ron
Thanks, Ron.

2) is what I am currently doing. Having only 1 record in the control
table is not a problem.

I appreciate the other possibilities, especially 3). I have no
experience with forms (as my Access needs are almost entirely table
management and queries) but will look into them

John Scott

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
giving a proc database and table names as parameters Muhammed Al-Khoutani answers 2 January 10th, 2007 06:45 PM
Urgent problem - Stored Procedures using Created. Tables Mike Hutton answers 2 November 18th, 2005 02:56 PM
Use the input to an Access 2003 form as parameters to a SQL Server stored procedure fumanchu answers 6 November 13th, 2005 03:05 PM
stored procedures with parameters (in .adp) zlatko answers 1 July 20th, 2005 06:25 AM