Field Names

  • Thread starter Thread starter Top Spin
  • Start date Start date
T

Top Spin

Suppose I want to create a home inventory and maintenance database. I
want to use it to keep track of appliances and their maintenance
schedules and histories.

I might have a "Vendor" table for the places where I bought the item
(Joe's TV, Sears, Elm Street Hardware, etc.) and an "Item" table for
the individual items (TV, microwave, furnace, dishwasher, etc.).

I would want a "Name" field in each table. Is it OK to use "Name" for
the field name (or "strName") or should I use "strVendName" and
"strItemName"?

Thanks

--
Running MS Office 2K Pro
PC: HP Omnibook 6000
OS: Win 2K SP-4 (5.00.2195)
Email: Usenet-20031220 at spamex.com
(11/03/04)
 
I don't think the word Name is reserved in Access, so in theory you
could use it without problems; the same would not hold true for Date though!
Generally speaking, I find it useful to prefix my field names with a
short for the table name, like vd for vendors, ap for appliances, sv for
service etc, so when there are similar named fields in different tables
I can easily "tell" which is which, which comes very handy in SQL and
code. for instance, apDate for purchase date of an appliance and svDate
for an appliance's service date.
As per standing best prectice, the prefix str would be used in VB code
for a string variable (likewise int, dbl etc), rather than on a table
field name.

HTH,
Nikos
 
"Name" is a Property of virtually every object in Access.

I certainly avoid "Name" as a Field name since this creates complications
later. For example, I may wat to use:

Me.Name

to refer to the value of Field "Name" but I will end up with the Form's
name.
 
Back
Top