Default value from previous record

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

Is there a way to set the default value to pick up the value from the same
field in the previous record?
 
On the AfterUpdate event of the control that is bound to the field, put this
code:

Private Sub TextBoxName_AfterUpdate()
Me.TextBoxName.DefaultValue = """" & Me.TextBoxName.Value & """"
End Sub
 
Note that you cannot do this in a table, only in a form (see my earlier
reply for how to do this). Which, by the way, is the *only* way you should
be entering/editing/manipulating/viewing/displaying data anyway!
 
Back
Top