Thanks for your reply Douglas.
It appears that we have a misunderstanding. First, this is not for use in
forms and reports. Second, repeating the same TWO fields in all my tables
would seem to me to be against normalization. I could set up a third table
that has three fields - DK, SK, and UniqueID. I just wanted to get there in
the second table. After all, we don't use a separate table for the area code
of a phone number. (Access actually did that once for me when I got a list
of phone numbers from an Excel file.)
Say, I have 20 aux. tables all of which are dependent/related to the DK/SK
combination (the DKs come in many SKs). If I have to list both fields in
each aux. table in order to insure uniqueness, I will have many SKs in each,
which I see as against normalization. Having the DK with an SK "prefix"
would also be a good visual check that would help the user to know the style
at a glance, much as seeing the area code 202 tells you it is Washington, D.C.
Perhaps it is not a good idea, and my third table above is better, but the
issue becomes more complex once I send replicas out because all those tables.
R-
"Douglas J. Steele" wrote:
> What's the matter with having two separate fields? That's the way it should
> be done. What you're proposing would actually be a violation of database
> normalization principles, one of which states that each field should be
> atomic (you're trying to put two pieces of information into one field).
>
> If you want 37405 displayed on forms or reports, you can concatenate the two
> fields. Store them separately though.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Richard" <(E-Mail Removed)> wrote in message
> news:1835D40E-DDE2-45A7-AE3D-(E-Mail Removed)...
> >I have many tables based on two fields in two different tables. Rather than
> > have both PKs in every table, I would like to have a PK from one table
> > (tblStyle SK (StyleKey) 1...50) be in combination with an autonumber
> > giving
> > me a unique ID based on the two so that it looks like this:
> >
> > tblDesign Primary Key = (SK)37+autonumber = 37405
> >
> > If this is possible in Access, would you please explain how I would go
> > about
> > doing this? Thank you
>
>
>