Go ye forth and sin no more!
You are really 'ok'. Here is guidance to enlightment.
You have 'People'
People have grades and locations (and frankly probably a lot more). You may
need to handle telephones and addresses and how that is done depends on if
each person is allowed to have one and only one telephone and address
(database normalization)
In the case at hand.
You most likely really want to handle the case where the person has many
grades (over time) so I will discuss that case.
TablePeople:
PeopleID (autonumber, Key), LastName, FirstName, etc.
TableGrades
GradeID (autonumber, Key), GradeDescription(text)
TablePeople_Grades
People_GradeID (autonumber, Key), PeopleID (number, FK), GradeID
(number,FK), Date (date/time)
---------------------------------------now we build the relationships in the
relationship view.
TablePeople 1 --> M TablePeople_Grades
TableGrades 1 --> M TablePeople_Grades
All this does is say that each person can have many People_Grades and each
Grade can have several people assigned to it.
-----------------------------------------Now to the forms
(there are form wizards that build a reasonable form for you)
Build FormPeople to enter the data for the people
e.g.
Text box for LastName
Text box for FirstName
etc. for the rest of the fields
Build a Form for entering the data for the Grades
GradeID and Grade Description
Build a form for entering the data for the Relationship PeopleToGrades
drop down list for Person
drop down list for Grade
text field for Date
build a query to lookup person. Note set the sort order under display as
ascending
lkpPerson:: select PersonID, [lastname] & ", " & [firstname] as display from
TablePeople; (this will produce a "view" with
PersonID Display
1 Adams, Joe
2 Jones, Jane
build a query to lookup grade
lkpGrade:: selectGradeID,GradeDescription from TableGrade;
finally use these as the source of the lookup fields
set the 'bound' column to 1, number of columns to 2, column width to 0;2
Now you have a form with two dropdown lists in which you see 'meaningful'
stuff (e.g. a name and description) but store only a number in the database.
We are near the journey!!
Now you can add the PeopleToGrades to the FormPeople as a subform, with the
child/parent relationship set to PeopleID
Hide the PeopleDrop dropdown by setting it's visible property to "no".
Now allow the user to open the form and enter data
They never see the tables, and all the complexity behind the relationships.
They see a form in which they enter the data in a meaningful manner (to
them)
You on the otherhand have the ability now to go back into the database and
make changes without touching all the data
example
the powers that BE!! come down and decree
All GradeA people are now GradeAA and we want a new grade added, GradeA.
Go to the formGrade, change the text from GradeA to GradeAA (add one A) -->
all the current GradeA's are now instantly GradeAA's (because they are
really stored as (5).
Add a new record GradeA and it now appears as a choice on your drop down
list. (value 10)
Pretend to faint over this mega-task, say it will take weeks to sort it all
out, then go fishing !!
Best of luck
Ed Warren
Richard Hare said:
Hello All,
I'm just starting on my first database, it is for keeping track of
employees, vacancies etc. I just started with a table of biographical
stuff,
then when I wanted to put in their grades, and locations, I made up 2
separate tables, each with just these single fields in and used a 'lookup'
from a combo box from the biog table. Now having just read these 10
commandments on the mvps website
http://www.mvps.org/access/tencommandments.htm I am concerned that I have
sinned! I am very new to all the language used in databases, so am I
right
in thinking that I have already broken commandment 2 "Thou shalt never
allow thy users to see or edit tables directly, but only through forms and
thou shalt abhor the use of "Lookup Fields" which art the creation of the
Evil One."
I beg forgiveness if this is the case, but if so, could someone advise
on
what is a better way of entering the information I require.
Regards
Rich