Access Form Operations: "after update" event, apply a specific value to a field for the record that was updated...

KP_SoCal used Ask the Experts™
In Access 2010, I have a form where I'm updating records. Every time I update "field1", I'd like to automatically change the value in "field2" to 'complete.'

I appreciate any feedback as to what the most efficient method is for this task. I won't be able to test any responses until Monday. Thanks in advance!
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
John TsioumprisSoftware & Systems Engineer

Well it could be easy as
In the After_update event of field1
field2 = "complete"
but it could be a bit more complex..
Give some more info.
Dale FyeOwner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010

You could also use the form_beforeupdate event.
Most Valuable Expert 2015
Distinguished Expert 2018
I would also use the BeforeUpdate event - and ignore an empty input:

Private Sub Field1_BeforeUpdate(Cancel As Integer)

    If Not IsNull(Me!Field1.Value) Then
         Me!Field2.Value = "Completed"
    End If

End Sub

Open in new window


Thanks everyone for the feedback on this! Very helpful. I'm going with Gustav's recommendation. Have great weekend everyone!
Most Valuable Expert 2015
Distinguished Expert 2018

You are welcome!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial