In need of quick help

M

mstack

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.
 
M

mstack

Hi scubadiver - Basically I'm trying to figure out how to create a broad
column and then break that column down into smaller columns. For example, I
need a broad column labeled "Contact Information." I would then like to
create subcolumns within this broad column with headings such as "Email,"
"Phone," "Fax," etc.
 
C

Carl Rapson

You need to create a table named "Contact Information", which contains the
fields "email address", "phone", etc. Use the Form Wizard to step you
through the process.

Carl Rapson
 
L

Lynn Trapp

No, the concept of a "subfield" is foreign to relational database practice
and theory. You can have a child table, as suggested by Carl, that links
back to the your main contact table, however.
 
P

Pat Hartman \(MVP\)

Not only is there no way to, there is no reason to and to do so would
violate well established rules of normalization. In a proper relational
database, each column is atomic. That means that it contains a SINGLE piece
of information and there is no way to logically subdivide it.
To explain with an example, you would never store a person's name in a
single column. At a minimum, you would use two fields. One for first name
and one for last name. If your needs warrant, you might also store middle
name, prefix (Mr., Mrs.,etc), and suffix (Jr., Sr., etc).
Usually the fields of street address are stored in a single field with city,
state, and zip occupying separate fields. However, companies that do mass
mailings break the address part into multiple columns so they can separate
house number, street name, preceding compass designation (N, S, NE, SE,
etc), trailing compass designation (N, S, NE, SE, etc), street name suffix
(Street, Lane, Road, etc) which allows them to do better filtering and
duplicate detection. Applications that contain addresses from multiple
countries also break address into more discrete pieces since different
countries use different addressing methods.

What is it that you are trying to accomplish by mushing data together?
 
J

John W. Vinson

OK...so there is no way to make subfields in the actual database?

Correct.

You're using a relational database.

The way to handle fields is to... create fields.


John W. Vinson [MVP]
 
C

Chris2

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.
 
S

scubadiver

Your question doesn't make any sense whatsoever! I think you need to learn a
bit more about design.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top