View Full Version : Association of Customers to Groups Design Considerations


Rx_
09-28-2010, 07:28 AM
PLEASE see attached image:
Rule: A customer may share a delivery (dock) PAD with zero or more other customers.
A customer may only belong to one PAD (named PAD group).

Since a Customer can only belong to zero or one PAD, this design may be simple, but any considerations would be appreicated.

Overview:
Add a PAD_Name field to the Customer table to hold a FK integer to the Table_Pad_Name
In the Customer table, the default will be 1 (FK - "no PAD association")
The Table_Pad_Name - use an autocounter to enter the PAD names
If a customer PAD_Name field is greater than 1:
- Show the PAD check box as checked
- the PAD List box has a list of all associated Customers with same PAD Names
- If no association, user checks the PAD check box - this enables the Customer listbox - the first PAD association is created (Prompt to ask user to name the PAD) and this association is completed.

KISS - If there is something missing please let me know.
It appears that with one field and one new table, this can be accomplished.

Rx_
09-28-2010, 10:56 AM
Ended up adding an ID_PAD_Name to the Customer table.
Then created a Customer_PAD_Name table.
Some logic to allow a user to add a new Pad Name.
Otherwise, the ID_PAD_Name is just a combobox htat allows users to select from a list of existing names.
The PADListbox - is just a filter on the current forms Customer ID - and takes the current PAD number and shows all Customers with the same ID_PAD_Name.