How to commit changes immediately to its record source (1 Viewer)

daryll

Registered User.
Local time
Today, 05:48
Joined
Jan 2, 2018
Messages
49
I have a simple continuous form which directly fetch records from its record source. A checkbox and description are only the fields which my form contains. Only the checkbox is amendable. I noticed when ticking the checkbox it doesn't apply the changes immediately to the table until moving the focus to the next or previous row. I tried executing the docmd.save in on_mouse_up event but of no help. Does anyone could tell me what's the other way around?
 
Last edited:
Do you only want the Record saved if the Checkbox is checked...or whether it's ticked or unticked?

Why do you need the Record saved while you're still on the Record?

With a Checkbox, you could use the OnClick or the OnChange event.

But

DoCmd.Save

is used to save design changes to an object, such as a Form, not to save data!

Try something like

Me.Dirty = False

or

DoCmd.RunCommand acCmdSaveRecord

Linq ;0)>
 
Your suggestion is a lot way better, instead in the on_click event of a checkbox i inserted the
Code:
DoCmd.RunCommand acCmdSaveRecord
in the on_click event of the button. Same result with no overhead.

Thanks
 

Users who are viewing this thread

Back
Top Bottom