1) users can always type CTRL ' (control key and apostrope at the same time) in a field and Access will copy the previous value to that field
if you still need to automate:
2) if you have multiple users entering data, then you won't be able to tell what a certain user entered unless you also keep track of a user id in each record. is this the case? if so you will need more code that what is below.
3) if there is only one user, or you don't care what user entered in the last value and you just want to copy the data from the previous record, put in the form's BEFORE INSERT put an [Event Procedure] and copy this. You will have to change the name of the Table, ID, Form, TextBox and Value1 to your own values.
Private Sub Form_BeforeInsert(Cancel As Integer)
'Determine ID in the underlying table of the last record entered
Dim CurrentID
CurrentID = DMax("ID", "Table1"
'Lookup the value in the table with the ID you just determined and set
'the text box of the current record to it
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.