P
Peter Hallett
Some of the members listed in tbl_Members belong to groups, designated ‘A’,
‘B’, ‘C’, etc. These members are listed in tbl_Group_Members by group
designator and ID. A form, bound to these tables, joined by ID, is used to
display group members by name. All the group designators, together with
their associated properties, are listed, for each member, a check box
identifying to which group, or groups, the currently-displayed member
belongs. Group membership can be changed, or augmented, by checking an
alternative, or additional, check box. Group members are displayed in turn
by means of the navigation buttons. This all works well.
A new requirement is to provide an option button, alongside each group
designator, which, when clicked, will overlay the currently-displayed form
with a pop-up continuous form, listing the current members of the associated
group. The problem then arises that the pop-up form needs to be bound to the
same tables (tbl_Members & tbl_Group_Members) as the current form. When any
option button is clicked, a run-time error 3008 results, complaining that
multi-user access is being sought to the bound tables, which may thereby be
programmatically altered, even though the pop-up is opened in read-only mode.
The obvious solutions all seem to involve difficulties. One is to
substitute a sub-form for the pop-up. Unfortunately, however, the
form/sub-form link is the group designator, which is not defined until the
option button is clicked to select the group for which the membership list is
required. I think I am right in stating that form/sub-form links cannot be
created/recreated dynamically.
Another option is to provide a sub-form for each group, hiding all of them
on opening the main form and then displaying the appropriate sub-form when
the selector button is clicked. With seven sub-forms currently involved, and
maybe more to follow, that looks like the use of a sledgehammer to crack the
proverbial nut.
Other ideas might be to close the main form before opening a pop-up, or make
copies of the tables to which the pop-ups are bound but none of these options
appear attractive. Can anyone suggest a better approach?
‘B’, ‘C’, etc. These members are listed in tbl_Group_Members by group
designator and ID. A form, bound to these tables, joined by ID, is used to
display group members by name. All the group designators, together with
their associated properties, are listed, for each member, a check box
identifying to which group, or groups, the currently-displayed member
belongs. Group membership can be changed, or augmented, by checking an
alternative, or additional, check box. Group members are displayed in turn
by means of the navigation buttons. This all works well.
A new requirement is to provide an option button, alongside each group
designator, which, when clicked, will overlay the currently-displayed form
with a pop-up continuous form, listing the current members of the associated
group. The problem then arises that the pop-up form needs to be bound to the
same tables (tbl_Members & tbl_Group_Members) as the current form. When any
option button is clicked, a run-time error 3008 results, complaining that
multi-user access is being sought to the bound tables, which may thereby be
programmatically altered, even though the pop-up is opened in read-only mode.
The obvious solutions all seem to involve difficulties. One is to
substitute a sub-form for the pop-up. Unfortunately, however, the
form/sub-form link is the group designator, which is not defined until the
option button is clicked to select the group for which the membership list is
required. I think I am right in stating that form/sub-form links cannot be
created/recreated dynamically.
Another option is to provide a sub-form for each group, hiding all of them
on opening the main form and then displaying the appropriate sub-form when
the selector button is clicked. With seven sub-forms currently involved, and
maybe more to follow, that looks like the use of a sledgehammer to crack the
proverbial nut.
Other ideas might be to close the main form before opening a pop-up, or make
copies of the tables to which the pop-ups are bound but none of these options
appear attractive. Can anyone suggest a better approach?