Question MSAccess2013 - Table Struture (1 Viewer)

foxtrot1981

New member
Local time
Today, 04:03
Joined
Nov 30, 2010
Messages
11
I have a pricelist in MSExcel with 17 sheets and I have created the tables according to the fields in MSExcel.
Normally each worksheet contains a model number with peripherals (up to 30 different peripherals) for the particular model number.
My problem and I need some suggestions please or an example will be appreciated...
Some of the sheets however contains 2 or 3 model numbers but they use the same peripherals.
When I build the form I want to select the model number and then the peripherals for the specific model must be display in order for me to select the peripherals for the specific quote.
Pricing change on a monthly basis and new model being added and old models being deleted - I can change the excel workbook manually but then I just create more pain.
How would I go about this?

Let me give some more information because I've got 30 odd models with different peripherals ie normally one model will have 1 and up to 30 peripherals. It can also happen that more than one model uses the same peripherals as another model.
Example:
Model=AF1000
Peripheral=ABC230
Peripheral=VFR200
Peripheral=KME334
Peripheral=LOP100
Peripheral=SEP555

In my form I want to select the model and then the peripherals must be displayed in order for me to tick the peripherals which I want to add.
Example:
Model=AF1000
Peripheral=VFR200
Peripheral=LOP100

I'm looking for a way to link the peripherals to the model number in order for the dropdown to display only the peripherals associated to the specific model number?

Any help or an example will be appreciated.
 

plog

Banishment Pending
Local time
Yesterday, 20:03
Joined
May 11, 2011
Messages
11,675
You need a Junction Table (http://en.wikipedia.org/wiki/Junction_table). Your structure should be comprised of 3 tables: Models, Peripherals, ModelPeripherals. The last table being the Junction Table where you assign what peripherals go with which models. The data would look like this

Models
ModelNum, AnotherField1, AnotherField2
AF1000, more model data, more model data
AF2211, more model data, more model data

Peripherals
PeripheralNum, AnotherField1, AnotherField2
VFR200, more peripheral data, more peripheral data
LOP100, more peripheral data, more peripheral data
ABC230, more peripheral data, more peripheral data

ModelPeripherals
ModelNum, PeripheralNum
AF100, ABC230
AF100, LOP100
AF100, VFR200

You're drop down would then be either based on ModelPeripheral or a query with that as the basis and linked to Models and Peripherals or both.
 

Users who are viewing this thread

Top Bottom