But can a member also have many duties? That is also possible, but requires a join table for easiest implementation.
For now, I'll assume one duty per member. Relate your tables like this:
Members::DutyID = Duties::DutyID
Duties::DutyID is an auto-etnered serial number field. Members::DutyID is a number field.
Now you can format Members::DutyID as a value list of DutyID's from the Duties table, with a name field from the same table displayed in the second column of this value list. To assign a duty to a given member, simply pull down the value list or pop up the menu and select a duty.
Thanks mate, Sorry to be a pain but yes members can also attend many duties , do you mind explaining (as simple as you can) how this would be possible please
No problem. This is called a "many to many" relationship.
Members::MemberID = Member_Duties::MemberID
Duties::DutyID = Member_Duties::DutyID
Put a portal to Member_Duties on the members layout to see a list of all duties assigned to that member. You can add fields from Duties to the portal row to disply more detail about that duty such as the duty's name or description. In like manner, you can place a portal to member_duties on the Duties layout to list all members assigned to that Duty. Any information specific to that member's duty assignment can be entered in fields defined in the Member_Duties table.
Brill thanks, next (sorry) simple button on a duty record that says add member - Basicly how do i now assign a member to a duty in a simple user freindly way - Ideally by a button. thanks again
Instead of a button use a drop down list or pop up menu on the MemberID field in the portal to Member_Duties.
- In Manage | Database | Relationships, double click the relationship line linking Duties to Member_Duties and select the "Allow creation of records via this relationship" option for the Member_Duties table if you have not already done so.
- In Manage | Value list, you can set up a value list that lists all member ID's from the members table in column 1. List the member names from column 2. When you select a member from this list, you'll see the member names so that you can see who you are selecting, but when you select them, their member ID is what is entered into the field.
- Now go to the Member_Duties::MemberID field in the portal and use the Inspector's data tab to format it as either a drop down list or pop up menu that uses this value list. (You can put the members::MemberName field next to this field to show the member's name when you exit the drop down.