user2783755
user2783755

Reputation: 588

Update event handling in Access form

I’m newbie in VB and Access. So I have table with Yes/No column „Channged”, and some text column, when I change text in text field (using form) I want to set Changet to true.

In my form, I handle Update event:

Private Sub Question_Updated(Code As Integer)

End Sub

How can I update Changed column through this method? Thanks.

Upvotes: 0

Views: 133

Answers (1)

Wayne G. Dunn
Wayne G. Dunn

Reputation: 4312

You can use the following code to set your Yes/No UNBOUND field as long as it is included in your recordset for the form. Note that I am using the 'AfterUpdate event for the field you will be changing. The update will take place AFTER you move to another record or close the form.

Private Sub Question_AfterUpdate()
    Me!YesNo = vbYes
End Sub

Upvotes: 1

Related Questions