View Single Post
  #14  
Old November 14th, 2005, 07:49 AM
tina
external usenet poster
 
Posts: n/a
Default Question about a default table or method

This is one
case in which having dozens of unrelated fields in a record makes a lot
of sense.


well, i don't know about *dozens* of fields in a tblMisc, LOL. i think i've
had maybe five or six fields in a single miscellaneous table, tops.
sometimes a field to hold some arbitrary date that has some significance to
part or all of the database, maybe another field for the current user - just
so i don't have to keep looking it up on the system, maybe the name of the
company (that the db belongs to) for use in report headers - so it can be
changed easily in one place. that's about it - just a few odd little bits of
data that don't belong anywhere, but shouldn't be hard-coded because they
will/may need to be changed frequently/occasionally.


"Vincent Johns" wrote in message
nk.net...
Tina's "miscellaneous" Table has worked well for me, too. This is one
case in which having dozens of unrelated fields in a record makes a lot
of sense. I do try to give the fields suggestive names (not "Value1",
"Value2", etc.) and of course I add comments (in Table Design View) to
provide some explanation of what the datum means. (Those comments are
not just for someone else's benefit -- it also helps me, six months or
more later.)

-- Vincent Johns
Please feel free to quote anything I say here.

tina wrote:

[...]
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