Need help setting up my tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello everyone!!

I need help in figuring out how to set-up my tables for the fallowing
scenario to work.
1st- I want to setup a main table where all the data is gathered from
called:member_table
Will include:
Name Race Class lvl

2nd- my problem is this: i want to have a combo box for the race and one for
the Class.

Up to here i can create the one for the Race no problem, but when i select a
race i would like to see(in class column) only the class changes available
for that race.

How to i setup my tables.
So far i was thinking of one for the race and another for class.

But no matter how i hook them up, i can nver get the desired result.

Example:

Name Race Class lvl

Jim Dwarf Artisan 45
Scavy
WS
BH

How do I do this table wise..

Thx for anyhelp you can give me, its much appreciated..
Pat
 
Patrick.
This can be done several different ways.
1. In the design view of the table you are creating in the "data type field
box" hit the down arrow and go to the look up wizard.
When you do this the wizard will ask if you want the wizard to set up the
options or would you like to do it your self. Check do it your self. Then
you will be directed to a form where you will enter your options. When you
are finished the data type box will default back to text. When you go back
to your table view, the options will show in the particular box you are
looking for.

2. The second way to do this is to create 2 different table. One containg
the race, and the other the class. Then you would have to build a
relationship between the 2 table. I think the wizard is a little easier.

Good Luck
 
1. I am not sure how you propose to enter data but the first thing you need
to know is that the "Cascaded ComboBoxes" technique doesn't work in
DatasheetView of the Table. You need to use proper Form for data entry
since you need Event triggers to do this (namely, FirstComboBox_AfterUpdate)

2. I am not sure about your classification of Race & Class but your Table
Structure will depend on wether 2 Races can have the same Class or not.
Let's assume that a Class can only belongs to exactly one Race, then you can
set up a tblRace and a tblClass in a One-to-Many relationship. Then (in
theory but see later in point 3), you can set up a ComboBox on the Form to
select a Race for the Record in the tblMain and use the ComboBox_AfterUpdate
Event to re-query the second ComboBox (bound to the Class Field) to show
only Classes that belongs to the selected Race.

3. However, in this case, the tblMain stores *redundant* data since if you
know the Class of the Record, you can work out the Race. Since storing
redundant data is not recommended due to the possiblity of data
inconsistences (you may end up with a Record that shows a particular Race
and a Class that doesn't belongs to the Race), you should not store the Race
in the tblMain.

4. It gets more complex if a Class can belong to more than one Race , i.e.
you will need to handle the Many-to-Many relationship.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top