mstack said:
Hi I am in the process of putting together a database and my boss is not too
familiar with Access and neither am I. I was wondering if there is any way
to create "subfields" in Access. For example, I am looking to make a main
heading "Contact Information" and then subcolumns within that column with
headings such as "email address," "phone," etc. Thank you for your
help.
mstack,
To echo the other comments here, MS Access cannot create "subfields",
and you actually do not want to do that.
You would want two tables.
Contacts:
ContactID (an AutoNumber or other identification number)
NameFirst
NameLast
etc.
ContactInformation:
ContactInformationID (an AutoNumber or other identification number)
ContactID (a "foreign key" that "refers" back to the Contacts table *)
AddressType
AddressOne
AddressTwo
AddressThree
City
State
Province
ZipCode5
ZipCode4
PostalCode
Nation
etc.
* You use MS Access' Relationship window, add both tables, and then
drag and drop the ContactID column from ContactInformation over to
Contacts. This should cause a line to be drawn on the window between
the two tables. You would be offered various options for "relational
integrity". Normally, I check all options (in Access 2000) if I'm
using this window **.
(** I normally set up relational integrity by writing DDL SQL. Don't
worry if you don't know what that means yet.)
Relational Integrity: All rows in all tables are identified by a
"primary key". As you can see above, ContactID gets carried over from
Contacts to ContactInformation. Relational integrity is where you set
up an MS Access Relationship ("foreign key" to the rest of the
database world) that goes from ContactInformation back to Contacts.
What this foreign key does is automatically stop any value from being
entered into the ContactID column in ContactInformation that isn't
currently in the ContactID column in Contacts. Why do we care?
Because if the ContactID column in ContactInformation has a value in
it that *doesn't* exist in Contacts, then you have a set of contact
information that belongs to no one.
Sincerely,
Chris O.