Hi all,
I've tried Google for hours and can't find a solution to my problem. In the forums, this poster asked the exact question I have, but there was no solution. So I'm going to ask again.
Goal: A form to input a particular subtype record, where the supertype contains some of the qualities of the subtype.
Scenario: The following are simplified versions of my database's table (excluded some non-relational fields):
tblSupply
SupplyID (PK)
SupplyTypeID (FK)
tblSupplyType
SupplyTypeID (PK)
TypeName (Short Text)
IsAsset (Yes/No)
tblAsset
SupplyID (PK & FK)
SerialNum (Short Text)
AssetModelID (FK)
tblAssetModel
AssetModelID (PK)
ModelName (Short Text)
SupplyTypeID(FK)
tblConsumable
SupplyID (PK & FK)
QuantityOnHand (Number)
So basically I have Supply supertype, which is separated in Asset and Consumable subtype. Asset would be something like a specific nailgun and Consumable would be something like a single nail. It should be noted that each Asset's SupplyTypeID can be found by two paths: in tblSupply via SupplyID or in tblAssetModel via AssetModelID. This bring me a side minor issue:Defining an Asset's SupplyType twice is the basic rules of normalization, but I want to associate each AssetModel with a SupplyType since they are not independent. That is an AssetModel is always only one SupplyType. Is this a wise denormalization? Or is there a better setup?
My primary problem is that I don't know how to create a form that records new Assets. If I start with a form based on tblAsset, it won't automatically pull an autonumber SupplyID. Also, I won't be able to input SupplyTypeID on tblSupply.
Is there some way to create a textbox control for both SupplyID and SupplyTypeID?
Should I make a form based on tblSupply and add a subform based on tblAsset? And how would I ensure that the record is linked?
Would setting up PKs for Assets and Consumables be helpful in any way?
Please help. Thank you very much.