S
Scott
Hi all,
Here's the short question
I'm hoping someone can suggest an elegant way for me to 'simulate' the
behaviour of the radio buttons in the 'Option Group' frame on a continuous
form which contains a Checkbox on each line (record). (whereby only one
checkbox is/can be 'selected' at a time)
Here's the long version
I have a child form I am popping up, which is a continuous form, and allows
users to enter multiple alternative sets of address info (street, city,
postcode etc) which are stored in a 'tbl_addresses' table. This child form
is called from a button on a parent form called 'frm_clients' (data for
which is stored in tbl_clients) which contains all sorts of client info,
including one set of address info.
Each client can have several addresses, but only one is 'primary'. This
primary address is determined by checking a checkbox on the child form, and
then this address info is updated back to the parent form (and therefore
table)
I have all the code right for updating the primary address back and forth
between the two forms, but I'm trying to sort out some code to ensure that
only one address within the clients subset of addresses (determined by
unique ID numbers) can be selected as primary (at a time).
I was thinking that in the 'On click' of the checkbox, I could build a
dataset of the current clients addresses, set all the 'Primary' boolean
fields to False, and the set the current 'Primary' boolean back to True, but
this seems a bit clumsy.
If anyone has any suggestions, they would be greatly appreciated.
Thanks in advance
Scott
Here's the short question
I'm hoping someone can suggest an elegant way for me to 'simulate' the
behaviour of the radio buttons in the 'Option Group' frame on a continuous
form which contains a Checkbox on each line (record). (whereby only one
checkbox is/can be 'selected' at a time)
Here's the long version
I have a child form I am popping up, which is a continuous form, and allows
users to enter multiple alternative sets of address info (street, city,
postcode etc) which are stored in a 'tbl_addresses' table. This child form
is called from a button on a parent form called 'frm_clients' (data for
which is stored in tbl_clients) which contains all sorts of client info,
including one set of address info.
Each client can have several addresses, but only one is 'primary'. This
primary address is determined by checking a checkbox on the child form, and
then this address info is updated back to the parent form (and therefore
table)
I have all the code right for updating the primary address back and forth
between the two forms, but I'm trying to sort out some code to ensure that
only one address within the clients subset of addresses (determined by
unique ID numbers) can be selected as primary (at a time).
I was thinking that in the 'On click' of the checkbox, I could build a
dataset of the current clients addresses, set all the 'Primary' boolean
fields to False, and the set the current 'Primary' boolean back to True, but
this seems a bit clumsy.
If anyone has any suggestions, they would be greatly appreciated.
Thanks in advance
Scott