J
Jim Ory
Using WinXP and Access2K2
I have a database consisting of CLIENTS table and ADDRESSES table. Some of
these clients have more than one address and I’ve placed a check box on the
address sub form and it denotes that an address is PRIMARY. This is done so
only the primary addresses will get an address mailing label. CLIENTS=1 to
many=ADDRESSES.
Data entry depends on how meticulous the data entry person is and I’ve found
that several client’s addresses have all their primary addresses' check boxes
checked.
The ADDRESSES form is a sub form of CLIENTS.
I’d like to be able to write code where only one primary address check box
can be checked per CLIENT.
So far, all I can come up with is a combination of queries to find clients
with more than one address and then find if more than one check box has been
checked. This is used to create an Error Report that appears when the main
CLIENT form is closed, if the queries find more than one check box cheked.
Closing the error report opens the main Client form for correction. Seems
clumsy to me and I believe there must be a better, or more efficient way to
have the same effect.
Any ideas are welcome. Thanks.
I have a database consisting of CLIENTS table and ADDRESSES table. Some of
these clients have more than one address and I’ve placed a check box on the
address sub form and it denotes that an address is PRIMARY. This is done so
only the primary addresses will get an address mailing label. CLIENTS=1 to
many=ADDRESSES.
Data entry depends on how meticulous the data entry person is and I’ve found
that several client’s addresses have all their primary addresses' check boxes
checked.
The ADDRESSES form is a sub form of CLIENTS.
I’d like to be able to write code where only one primary address check box
can be checked per CLIENT.
So far, all I can come up with is a combination of queries to find clients
with more than one address and then find if more than one check box has been
checked. This is used to create an Error Report that appears when the main
CLIENT form is closed, if the queries find more than one check box cheked.
Closing the error report opens the main Client form for correction. Seems
clumsy to me and I believe there must be a better, or more efficient way to
have the same effect.
Any ideas are welcome. Thanks.