Moving data between forms when box is checked (1 Viewer)

abcibula

Registered User.
Local time
Today, 16:28
Joined
May 14, 2012
Messages
11
I have two subforms, Payments Due and Payments Received that are both linked to a Payments table. When a checkbox is clicked, the data moves from the Payments Due Form to the Payments Received Form.

The forms are both based on Queries, one Query specifying the box is checked, and one specifying the box is not checked.

The problem is that when the box is clicked, I have to move off the main form and then back onto it for the data to move from one form to another.

I've used this in the past and know there is a way to get it to move automatically "on click" but can't seem to get it to work.

Please Help!

Thank you
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:28
Joined
Feb 28, 2001
Messages
27,183
Concur with gasman. Once you click the checkbox, you need to requery the sub-forms.

However, be aware that doing so will cause the subs to reset themselves to the first record of the underlying recordsets. So you might also have to look into finding the bookmarks of the two query recordset clones and re-synchronizing them some way. Since we don't see the details of these forms and subforms, I can't advise you beyond that point without knowing (a) more details of the form and (b) more details of what you wanted to happen to the implied cursors in each of the subforms.
 

abcibula

Registered User.
Local time
Today, 16:28
Joined
May 14, 2012
Messages
11
I believe the last time I got this to work, I used an EVENT on the field with the check box, but I can't remember exactly how I did it and nothing I have tried seems to work. I believe it was an "On Click" Event so that I didn't have to move off the record for it to update.
 

Gasman

Enthusiastic Amateur
Local time
Today, 21:28
Joined
Sep 21, 2011
Messages
14,297
I would hazard a guess at the afterupdate event?
If checkbox is set then you run the code.
As Doc_man stated save the ID as it will now be in the new form. Not sure what you would do for the form that it came from though?
 

Users who are viewing this thread

Top Bottom