D
David Newmarch
I need to accommodate various many-to-many relationships between clients in
my tblClients table. I have two junction tables that enable this.
The first, tblCategoriesLink, enables clients to be assigned to various
client categories listed in the Categories field of the tblClientCategories
table (could be more than one category for a single client) . If one of the
categories for a client is "agent" then that client could have other clients
as subclients, provided that one of the categories these other clients have
been assigned to is "subclient". (Like each client wears various badges, and
those badges permit certain relationships between them - relationships which
can also change from time to time.) A second junction table, tblAgencyLink,
permits these agent/subclient relationships to be set, along with the date
the link is made. Subclients sometimes shift from one agent to another, and
the date is a way to keep track of this.
On my form for viewing and entering client particulars I have a subform
(sfrCategories - database view) for selecting the categories the client is
assigned to. If one of those categories is "agent'' then I want a second
subform (sfrSubclients - not nested) to be visible, where subclients can be
viewed or entered for that "agent" client. Correspondingly, if the client's
categories include "subclient" then I want a different subform (sfrAgencies)
to be visible, where that subclient's agent can be viewed (or entered). How
do I get the second or third subforms to display conditionally on the "agent"
or "subclient" value being present in the sfrCategories subform? And if
neither "agent" nor "subclient" is listed for that client, neither of the
additional subforms must be visible.
If I can get this to work, it seems like a neat, simple solution, but is it
feasible? Have very limited VBA skills, but I'll stretch them as far as I can.
my tblClients table. I have two junction tables that enable this.
The first, tblCategoriesLink, enables clients to be assigned to various
client categories listed in the Categories field of the tblClientCategories
table (could be more than one category for a single client) . If one of the
categories for a client is "agent" then that client could have other clients
as subclients, provided that one of the categories these other clients have
been assigned to is "subclient". (Like each client wears various badges, and
those badges permit certain relationships between them - relationships which
can also change from time to time.) A second junction table, tblAgencyLink,
permits these agent/subclient relationships to be set, along with the date
the link is made. Subclients sometimes shift from one agent to another, and
the date is a way to keep track of this.
On my form for viewing and entering client particulars I have a subform
(sfrCategories - database view) for selecting the categories the client is
assigned to. If one of those categories is "agent'' then I want a second
subform (sfrSubclients - not nested) to be visible, where subclients can be
viewed or entered for that "agent" client. Correspondingly, if the client's
categories include "subclient" then I want a different subform (sfrAgencies)
to be visible, where that subclient's agent can be viewed (or entered). How
do I get the second or third subforms to display conditionally on the "agent"
or "subclient" value being present in the sfrCategories subform? And if
neither "agent" nor "subclient" is listed for that client, neither of the
additional subforms must be visible.
If I can get this to work, it seems like a neat, simple solution, but is it
feasible? Have very limited VBA skills, but I'll stretch them as far as I can.