473,480 Members | 4,827 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Using Tables as Parameters

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.

Dec 11 '06 #1
3 1383
On 11 Dec 2006 13:15:32 -0800, "jg******@bellsouth.net"
<jg******@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.
>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.
Dec 12 '06 #2
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

Dec 12 '06 #3

Ron2006 wrote:
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

Dec 14 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
5422
by: Aaron | last post by:
The following code works fine when previewing a Crystal report using ASP, EXCEPT when it gets to a report using a SubReport and its associated parameters. The whole report just comes up blank with...
1
11564
by: Sandie Towers | last post by:
We use a number of similar databases and frequently create a new database using a backup restore of another similar database. We try to keep changes between databases in _Additional tables - like...
2
23869
by: Joe | last post by:
Hi All, I am new to using the Access DB and I need some help if someone is able to give it to me. What I want to do is get the names of the columns of certain tables. Not the data in the table...
2
1703
by: Mike Hutton | last post by:
I have a rather odd problem. I have a SP which uses temp. tables along the way, and then returns a table of results: CREATE PROCEDURE dbo.usp_myproc( @pNameList VARCHAR(6000) ) AS
3
2005
by: pjcraig | last post by:
This is driving me crazy! I have a form that a user will access from another form by selecting the item that they wish to view. When they open the new form, I pass through the id of the item they...
2
1581
by: Roy | last post by:
Hey all, Here's a small VB codeblock that connects to a database and uses 2 SQL queries then forms a relation for a master/detail view on the aspx side: Private Sub Binddata(ByVal name As...
8
2782
by: rbg | last post by:
I did use query plans to find out more. ( Please see the thread BELOW) I have a question on this, if someone can help me with that it will be great. In my SQL query that selects data from table,...
0
8817
debasisdas
by: debasisdas | last post by:
This thread contains some useful tips for using External tables. USING EXTERNAL TABLE ======================= 1.THE TABLE POINTS TO EXTERNAL FILE. IF DATA IS ALTERED IN THE EXTERNAL FILE,DATA...
1
2747
by: sachinkale123 | last post by:
Hi I am working in a Windows C# application. I m using Dataset. But whenever I updated the dataset it gets updated. I can see the changes in dataset but using SQLAdapter.Update(Dataset) command It is...
0
7040
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6905
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7041
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7080
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6736
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6908
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5331
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
2994
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.