From 1.
When you say create a field with all fields needed for the subclasses,
do you mean the tables as subclasses, or the fields for those uncommon
ones (fields).
I'm not really sure what you mean about sub classes, and I have been
trying to find more information on google but its not giving me much I
can understand.
From 2.
Referrring to a Master Tools Table, would that be just a list of the
different types of tools, of which there are 8, or would it have to
include anything else?
The present ID in all of the tables is just an Autonumber, as in
'ElectID' and 'HydraulicID' etc.
I understand it is complicated because it is getting that way for me now.
I am still learning Access 2007, and I am using a book : Access 2007
Inside Out to pick up as much as I can, and even in that book I have not
yet seen any references to subclasses as yet.
Thanks for your time.
This is the table structure for subclasses.
CREATE TABLE Equipment (
EquipmentID AUTOINCREMENT NOT NULL,
EquipmentType VARCHAR(30) NOT NULL,
CHECK (EquipmentType IN ('Electrical', 'Fire Extinguishers', 'Hydraulic',
'Lifting Equipment', 'Phneumatic','Precision Equipment', 'Torque Wrenches',
'Welding Equipment')), -- use validation rule instead of check
Manufacturer VARCHAR (100) NOT NULL,
Product VARCHAR (50) NOT NULL,
LastTestDate DATETIME NOT NULL,
NextCheckDate DATETIME NOT NULL,
Location VARCHAR (50) NOT NULL,
PRIMARY KEY (EquipmentID, EquipmentType));
CREATE TABLE Electrial (
EquipmentID LONG NOT NULL,
EquipmentType VARCHAR(30) DEFAULT Electrial NOT NULL,
CHECK (EquipmentType = 'Electrical'), -- use validation rule instead
SpecificField1 VARCHAR (50) NOT NULL,
SpecificField2 VARCHAR (50) NOT NULL,
SpecificField3 VARCHAR (50) NOT NULL,
SpecificField4 VARCHAR (50) NOT NULL,
SpecificField5 VARCHAR (50) NOT NULL,
SpecificField6 VARCHAR (50) NOT NULL,
FOREIGN KEY (EquipmentID, EquipmentType)
REFERENCES Equipment (EquipmentID, EquipmentType),
PRIMARY KEY (EquipmentID));
CREATE TABLE [Fire Extinguishers] (
EquipmentID LONG NOT NULL,
EquipmentType VARCHAR(30) DEFAULT Fire Extinguishers NOT NULL,
CHECK (EquipmentType = 'Fire Extinguishers'), -- use validation rule instead
SpecificField1 VARCHAR (50) NOT NULL,
SpecificField2 VARCHAR (50) NOT NULL,
SpecificField3 VARCHAR (50) NOT NULL,
SpecificField4 VARCHAR (50) NOT NULL,
SpecificField5 VARCHAR (50) NOT NULL,
SpecificField6 VARCHAR (50) NOT NULL,
FOREIGN KEY (EquipmentID, EquipmentType)
REFERENCES Equipment (EquipmentID, EquipmentType),
PRIMARY KEY (EquipmentID));
You need a table for each subclass.
SpecificField1, etc. is just to represent some field specific to the subclass.
Here is a simple example.
http://www.psci.net/gramelsp/temp/Training Instructors.zip