Copying the contents of a previous record to the next record

G

Guest

Hello,

I have a continuous form where data will be entered and the next record will
contain much of the same information entered in the previous record. How do
I automatically pull some of the record's data that was JUST entered to the
next record?

Thank you!
MN
 
R

Rick B

Do a search. This is asked and answered often. read the previous posts -
that's why they stay out there.
 
R

Randy

Place this code on your Currrent Event of your main form. Chnge to your
controls and record source ..Randy

Private Sub Form_Current()
Dim rs As Object
Set rs = Me.Recordset.Clone

If rs.EOF Or Not Me.NewRecord Then
' don't do anything if there's no records or it is not a new record
Else
With rs

.MoveLast

Me![cboEID] = .Fields("EID")
Me![CurrentDate] = .Fields("Current_Date")
Me![Dist_Id] = .Fields("District_ID")
End With

End If
End Sub
 

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

Top