View Single Post
  #19  
Old November 14th, 2005, 12:40 PM
Joe Cilinceon
external usenet poster
 
Posts: n/a
Default Question about a default table or method

Thank you tina and that is exactly what I was asking. I was looking for
methods of doing this efficiently.

tina wrote:
Joe, are you describing certain values that you use throughout your
database, but that don't really belong in a specific table? such as
one, and only one, current Sales Tax rate - with no need to store
*prior* rate values.

if this is what you're talking about, then read on for the solution i
use: i sometimes find myself with a few "miscellaneous" values that
are used in various places in my database but don't really "belong"
in any of my data tables. when that happens, i create a miscellaneous
table, with *only one record* (if you find that you need multiple
records of one value, then that's a legitimate table that should be
built as such), and a separate field for each value that i need to
store. the table is not linked to any other table, and the fields in
the table usually don't have anything to do with each other.

having built and populated tblMisc, you can retrieve a particular
value wherever you need it in your database, with a simple DLookup()
function - remember that the table has only one record in it, so all
you need to do is look up the field holding the value you're after, as

DLookup("ThisField", "tblMisc")

hth


"Joe Cilinceon" wrote in message
...
What is the best way to have defaults in one location but available
to the whole application. Some examples would be Sales Tax rate,
Late Fee charge in addition to things like scanners/printers or
other things used with in the program.

--

Joe Cilinceon


--

Joe Cilinceon