Hey PC! Thanks so much for the encouragement.
1. And I like your idea of adding a Cause Year.
2. Well, this is tuff. This is the hardest part about building db's -
The initial planning on where to store all the crap (sorry developing a bad
'tude). As you may have guessed, this is to manage law (admin) cases. I
designed the following tables:
tblCaseInfo
tblRecords
tblHearings
tblTasks
tblStatus
tblDiscRec
tblDiscSent
All of the above have a one/one relationship with tblCaseInfo except
tblTasks. So are you saying I should lump the other tables into
tblCaseInfo? I designed it like I did above because there are just so many
fields! A lot to put in one table. And I thought this would be a logical
way to split it up and more manageable. My Master form has a main page
(tblCaseInfo) and then I created tabs/pages and inserted subforms for the
other tables - its purty!
![Smile :-) :-)](/styles/default/custom/smilies/smile.gif)
Anyway, what say you? Should I have stuck
to just the two tables: tblCaseInfo and tblTasks? btw, there are other
tables in the db, but its way tmi
3. So to normalize what I already have, I should simply create a new field
in tblCaseInfo and change the PK designation to it? If I do this, I have
to delete all the relationships don't i?
4. How do I do that? (doh!) DHSNo is a text field so how do I exchange
data (pluz pardon my ignorance - I am embarrassed that I hafta ask)
A BIG THANKYOU for all of your help so far. This db will be utilized
throughout the entire agency across the state and I sure don't want to look
more of a dummy than I already am! (Of course, you would think they would
have a real IT person do this - not a legal assistant for pete's sake! -
sorry ranting)
S. Jackson
Shelly,
-
You are definitely moving in the right direction!
Comments ----
1. You are now making the Cause# a data item; that's the correct thing to
do!
There's nothing wrong with having the dashes in the number. Telephone
numbers
have dashes! One thing you might consider is to add a CauseYear field.
Although
you can get the year from the Cause#, a CauseYear field wil just make
dealing
with your data easier.
2. You say you have other tables related to the main table in a
one-to-one
relationship. Although there are times when you might do this, the vast
majority
of the time tables are related one-to-many. You might reexamine the design
of
your tables and evaluate why you have one-to-one relationships and
evaluate if
you truly have a good table design overall.
3. Yes, add another field to your main table, make it autonumber and the
PK.
4. DO NOT add a new field to your other tables!! What you need to do is
exchange the value in the [DHSNo] field for the equivalent autonumber in
the
main table and make that field number data type - long integer.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
Thanks everyone for trying to help:
Pavel / PC Datasheet: I "think" I am getting it, but am not sure I know
what the heck I am doing (gee big surprise there, eh?).
The PK field in the main table currently is a text field [DHSNo]
containing
data like this: yy-xxxx-k. Now, before everyone freaks out about using
one
field for multi-values or using dashes, understand that this field
contains
a legal cause number assigned by a court of law. That is the how the
Cause
number looks, period. It does not represent multi-values or a
combination
of values. It is one value. I now know using a "-" is frowned on, but
that is the way the Cause Number looks, so if anyone has a better
solution,
let me know.
My other tables contain the same PK field [DHSNo] and have a one-to-one
relationship with the main table.
So . .. with that said, I think what I want to do is add another field
(autonumber field) to my primary table? Make it PK? Add a PK
autonumber
field to my other tables that are related?
As you can tell, I do not have a very good grasp on the relationship
business. Please let me know if I am on the right track here.
S. Jackson
I think that you can follow the suggestion of PC Datasheet by
duplicating the PK into a NewDataField and then not do anything else.
Leave the PK as it is (perhaps, reduce its length if its alphabetic
and
existing values will allow it), but stop using it for real data. If it
is numeric, change it to autonumber and you are done. If it is not
numeric, use code to generate new unique PKs. You will not need to
touch
the relationships at all, and will not need to modify related tables.
Pavel
S Jackson wrote:
Can I change the primary keys in my tables after data has been
added?
Because of ignorance and the lack of any kind of training (grrr. .
. ),
I
have used a field with REAL data in it as a primary key in my main
table.
TIA
S. Jackson