Database wide parameters

  • Thread starter Thread starter Eric Crichton
  • Start date Start date
E

Eric Crichton

As a relative novice, I am struggling to find a convenient means of
setting some parameters that can be used by all the queries in the
database.
Specifically, I need to define a couple of dates (which I can do with
forms) and then have a number of parameter queries access these
parameters without asking for the parameters each time.
Where do I store the dates? Sticking them in a small table seems very
clumsy.
The parameter life extends across many sessions of use.
I've tried a range of solutions but all seem unbeleivably clumsy and
I'm sure there must be some well known solution that eludes me.
Eric
 
Eric

If you are saying that you need to set parameter values that persist from
session to session, a table is a reasonable place to store data. If there's
a chance that these parameters will change over time, a table is a good
place to store the data. While you could create routines that set a global
variable, you'd have to change the routines every time the parameter values
changed. If you are already using a form to capture the values, consider
binding that form to an underlying table wherein you store the values.
 
As a relative novice, I am struggling to find a convenient means of
setting some parameters that can be used by all the queries in the
database.
Specifically, I need to define a couple of dates (which I can do with
forms) and then have a number of parameter queries access these
parameters without asking for the parameters each time.
Where do I store the dates? Sticking them in a small table seems very
clumsy.
The parameter life extends across many sessions of use.
I've tried a range of solutions but all seem unbeleivably clumsy and
I'm sure there must be some well known solution that eludes me.
Eric

As Jeff suggests, for truly persistant criteria a Table is
appropriate.

For session-persistant criteria, you can open a Form with textboxes
for the criteria - let's call it frmCrit, with textboxes txtFrom and
txtTo. The criteria
=Forms![frmCrit]![txtFrom] AND <= Forms![frmCrit]![txtTo]


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top