ms-accessvbams-access-2007

Using VBA to Update a form recordset in Access 2007


I'm doing some development in access and I'm running into an issue where I need to make sure that a form is updated in a buttons OnClick handler.

I was thinking that it might work something like this:

if me.dirty then
    me.update     'This is a nonexistent form method'
end if
<rest of handler>

If such a thing exists, will I have to call the OnUpdate Event handler manually?


Solution

  • How about:

    if me.dirty then
        me.dirty=false 
    end if
    

    Code as per Allen Browne, MVP:

    http://allenbrowne.com/bug-01.html