Thread
:
Building Composit key on the fly, Boy Scout Data Base
View Single Post
#
4
March 26th, 2010, 11:27 PM posted to microsoft.public.access.tablesdbdesign
Steve[_77_]
external usenet poster
Posts: 1,017
Building Composit key on the fly, Boy Scout Data Base
When entering data into a database, you have to rely on the data entry
person at some point!
You need these tables:
TblPerson
PersonID
person fields
TblMeritBadge
MeritBadgeID
MeritBadgeName
TblMeritBadgeAward
MeritBadgeAwardID
PersonID
MeritBadgeID
DateMeritBadgeAwarded
You need a form/subform for entering data. Base the main form on TblPerson.
Base the subform on TblMeritBadgeAward. Set the LinkMaster and LinkChild
properties to PersonID. Use a combobox in the subform to enter MeritBadgeID.
Your form/subform will display a single person and a list of merit badges
awarded to that person. You can sort the merit badges in alphabetical order.
Now all you need do is rely on the data entery person not to enter a
duplicate merit badge for any person.
Steve
"Dick Patton" wrote in message
...
Hi all,
I have two tables each is unique. One is the "Merit Badge" tabel the
other
"person Id" (name address info) tabel, there is a link tabel "MB-ID_link".
This intent is to connect mert badges with the IDs of Councelors. That
works
great, however, i find that i can add duplicate records (same Person, same
Merit badge many times) this is not good.
I created a "check_key" field in the Link tabel which i defined as primary
key. This will stop duplicates from being entered without a lot of code.
The problem is i am not sure how to populate the new key. I know of no
way
of concatination in access or where to place the code, but it must be
built
before update.
So - I tried: Check_key = trim([MB_code) & [Person_ID]) in the event
calle
"before UPdate" that did not work!
It seems like such a simple thig to do!
Help
Dick
Steve[_77_]
View Public Profile
View message headers
Find all posts by Steve[_77_]
Find all threads started by Steve[_77_]