G
Guest
I am an occasional programmer, and a relative novice.
I have a form, frmA, that contains two subforms, frmB and frmC. I have
written a procedure to copy certain fields from frmB to frmC, based on the
value of a checkbox in the underlying table of frmB. If the checkbox is True,
the relevant fields in the records are copied, else the record is ignored.
Everything works fine when I manually select the checkboxes. I have written
another procedure to select all the checkboxes of form B as True when I press
a button. This was accomplished by opening a recordset clone based on form B,
and moving through the records using a Do .. Loop procedure. The procedure
seems to work; the checkboxes are all checked, but when I run the code to
copy the records, only the first record copies. I have tried to requery the
form, but it makes no difference. The only thing that fixes it is to close
and open the form again. There must be a more elegant way to do this. I would
appreciate any suggestions.
Many thanks.
I have a form, frmA, that contains two subforms, frmB and frmC. I have
written a procedure to copy certain fields from frmB to frmC, based on the
value of a checkbox in the underlying table of frmB. If the checkbox is True,
the relevant fields in the records are copied, else the record is ignored.
Everything works fine when I manually select the checkboxes. I have written
another procedure to select all the checkboxes of form B as True when I press
a button. This was accomplished by opening a recordset clone based on form B,
and moving through the records using a Do .. Loop procedure. The procedure
seems to work; the checkboxes are all checked, but when I run the code to
copy the records, only the first record copies. I have tried to requery the
form, but it makes no difference. The only thing that fixes it is to close
and open the form again. There must be a more elegant way to do this. I would
appreciate any suggestions.
Many thanks.