Solved

table advice

Posted on 2011-02-26
4
253 Views
Last Modified: 2012-05-11
I have a table tblAffiliates where people can register as affiliates. Only some of the applicants are actually accepted. With those people I need to give them an Affiliate Code.

I am thinking of setting up a second table tblAffiliateCode so the codes can be unique (and without nulls).
eg
ID    Code
1    A01
2    A02
3    A03, etc.

How would I relate the 2 tables? would I add an AffiliateID in the tblAffiliateCode table? or would it be better to add a filed in the tblAffiliates table and store the ID or Code from the tblAffiliateCode  table?
0
Comment
Question by:Shawn
  • 2
4 Comments
 
LVL 32

Expert Comment

by:ewangoya
ID: 34989358

You can add the field AffiliateCode in table tblAffiliates and store the ID of the of the code in there


0
 
LVL 32

Accepted Solution

by:
ewangoya earned 250 total points
ID: 34989361

Sorry meant to type AffiliateID

Add the field AffiliateID in table tblAffiliates and store the ID of the of the code in there
0
 
LVL 4

Assisted Solution

by:tabish
tabish earned 250 total points
ID: 34989444
Add an ID like AffiliateCodeID (in your example you are calling it ID. I would prefer more self explaintory name) in tblAffiliates and store the AffiliateCodeIDs there .  

The structure of the table "tblAffiliateCode" to store code is ok. You just may want to change the name of the field from ID to AffiliateCodeID.
0
 
LVL 1

Author Closing Comment

by:Shawn
ID: 34989524
thanks for clarifying.

Shawn
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now