Default value in a table depending on the value of the key

Newman

Québécois
Local time
Today, 18:34
Joined
Aug 26, 2002
Messages
766
Here's a look at my table:

KEY - Date
KEY - TeamNumber (from 1 to 19)
- Manager

I want to put a default name in the Manager field depending on the value of the key TeamNumber.

How should I do that? Will I nead another table?

Thank you for your help!

And if you're good with reports, here's a link to another thread, for which I've received no answers yet.
http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=33634
 
You want another table, call it "Teams". They primary key is the TeamNumber. One of the data fields is the team manager's name.

Any queries for forms or reports can link your table to the Teams table to get the manager's name.

RichM
 
???
One of use isn't clear enough! ;)

It looks like you told me to make a copy of my table but without the field Date. It wouln't help! I still can type only one manager name...
I want to put a default name for the manager of the team one, another for the manager of team two, etc...
What I'd like to have, is the right to write this:

Select case TeamNumber
Case1
Manager=Newman
Case2
Manager=RichMorrison ;)
...
End Select

... in the property "default value" of the field "Manager".

Thanks!
Newman
 
Rich understood your question and so do I.

You don't need a default at all since you should not be storing manager in this table. Manager should be stored in the Team table. When you want to see tha manager of a team, simply join to the team table.
 

Users who are viewing this thread

Back
Top Bottom