Logo

My Access Tips for Custom Microsoft Access

Application Development

by Matthew V Carmichael


Need Help?

My Tips


Links

Resources
Quick Tip Details
Question:
Automatically default (fill) the next record control with the previous record value.
Answer:
To accomplish this, create an “Add New Record” command button and assign the DefaultValue property of the control with the control’s value.
Code:
Private Sub cmNew_Click()
    Me.YourTextbox.DefaultValue = "'" & Me.YourTextbox.Value & "'"
    DoCmd.GoToRecord , , acNewRec
End Sub