?
Solved

table advice

Posted on 2011-02-26
4
Medium Priority
?
260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 32

Expert Comment

by:Ephraim Wangoya
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:
Ephraim Wangoya earned 1000 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 1000 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Viewers will learn how the fundamental information of how to create a table.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

762 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