A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Building Composit key on the fly, Boy Scout Data Base



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old March 26th, 2010, 08:40 PM posted to microsoft.public.access.tablesdbdesign
Dick Patton
external usenet poster
 
Posts: 14
Default Building Composit key on the fly, Boy Scout Data Base

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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:51 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.