P
PSI
Hello
I'm trying to setup the following tables:
1) Business:
ID - Autonumber primary Key
Name - text field
MainAddressID - Number field with required=Yes
ShipAddressID - Number field with required=No
ShipSameAsMain - Yes/No field
2) Address:
ID - Autonumber primary Key
Street1 - text
Street2 - text
City - text
StateID - number ( index into State table )
where the Business.MainAddress and Business.ShipAddress are one_to_one
on Address.ID with referential integrity enabled and cascade delete
(i.e. if delete business record the corresponding address records are
deleted). One twist is that the ShipAddressID is not required if the
ShipSameAsMain is Yes.
I've been unable to make this work properly - mainly get errors trying
to populate the tables in DataSheet view namely "can't add or change a
record becaue a related record is required in table ..".
Is this a reasonable way to handle the address's? or is the
convetional wisdom to just embed the fields into the Business table (
ie MainStreet1, ShipStreet1, MainStreet2, ShipStreet2...)
Any guidance on how to approach this would be much appreciated.
Thanks
Frank
I'm trying to setup the following tables:
1) Business:
ID - Autonumber primary Key
Name - text field
MainAddressID - Number field with required=Yes
ShipAddressID - Number field with required=No
ShipSameAsMain - Yes/No field
2) Address:
ID - Autonumber primary Key
Street1 - text
Street2 - text
City - text
StateID - number ( index into State table )
where the Business.MainAddress and Business.ShipAddress are one_to_one
on Address.ID with referential integrity enabled and cascade delete
(i.e. if delete business record the corresponding address records are
deleted). One twist is that the ShipAddressID is not required if the
ShipSameAsMain is Yes.
I've been unable to make this work properly - mainly get errors trying
to populate the tables in DataSheet view namely "can't add or change a
record becaue a related record is required in table ..".
Is this a reasonable way to handle the address's? or is the
convetional wisdom to just embed the fields into the Business table (
ie MainStreet1, ShipStreet1, MainStreet2, ShipStreet2...)
Any guidance on how to approach this would be much appreciated.
Thanks
Frank