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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top