Update text box using after update event on another

  • Thread starter Thread starter DeVille
  • Start date Start date
D

DeVille

I have two text boxes ('LastUpdate' and 'Solution') on my
form 'LastUpdate' is a text box that is to record when
the other text box 'Solution' was last updated.

I would like to attach some code to the AfterUpdate event
procedure on the 'Solution' text box which says to put
the current date in the 'LastUpdate' text box (or the
corresponding field in the table)

The question marks are where I am missing the code. If
anyone can help thanks in advance

Private Sub Solution_AfterUpdate()

DoCmd.?????

End Sub
 
I have two text boxes ('LastUpdate' and 'Solution') on my
form 'LastUpdate' is a text box that is to record when
the other text box 'Solution' was last updated.

I would like to attach some code to the AfterUpdate event
procedure on the 'Solution' text box which says to put
the current date in the 'LastUpdate' text box (or the
corresponding field in the table)

The question marks are where I am missing the code. If
anyone can help thanks in advance

Private Sub Solution_AfterUpdate()

DoCmd.?????

End Sub

No DoCmd needed.
Do you want the current date, or the current date and time?

Private Sub Solution_AfterUpdate()
[LastUpdate] = Date ' Date only
End Sub

or if you want the Date and time, use:
[LastUpdate] = Now


[LastUpdate] should be bound to the [LastUpdate] field in the table.
 
Back
Top