Check Box not updating

gary.newport

Registered User.
Local time
Today, 09:26
Joined
Oct 14, 2009
Messages
79
I have a form with a subform; the latter being of focus here.

The subform is a continuous form and one of the fields on this is connected to a YES/NO field in the relevant table, which means it is appearing as a checkbox on the form.

I wanted to have a button that reacted to the number of YES values set but have come across an interesting issue. If I click on one of the options and get the VBA to report how many are ticked then it will report zero. If I then click so that somewhere else gets the focus and run the code I get 1. Basically, though the checkbox is directly connected to the field in the table it is not automatically updating on the click.

If my VBA reacts before or after update to send the focus elsewhere the relevant value in the table will still not update?!

Struggling to find a way to get a click on the checkbox to register in the table so that a subsequent button clicked elsewhere will report the correct number of ticked options in the table.
 
You can force a save of the record with:

If Me.Dirty Then Me.Dirty = False
 
Thanks for this. It's really annoying when the solution is so obvious (and I have used it before) but grateful since I have already spent too long forgetting it and working on stupid solutions. :)
 
LOL! Happy to help.
 

Users who are viewing this thread

Back
Top Bottom