Help with copying data in fields

  • Thread starter Thread starter Josh
  • Start date Start date
J

Josh

I have an order form I am using for our company and I
want to make a command button that will reproduce certain
info from the current record to make a clone or duplicate
of the general info (same customer, vendor, PO#, etc.) I
don't want to duplicate all of the info on the form. It
is for when you have multiple orders from a certain
customer and the related info is the same so instead of
typing it in every time you can just click the command
button. HELP.

Thanks,
 
Hi Josh

There are several ways to do this, so here is one possibility: synch your
form's RecordsetClone to the current record and then navigate to a new
record and copy all the required fields across:

Private Sub cmdClone_Click()
With Me.RecordsetClone
.Bookmark = Me.Bookmark
DoCmd.GoToRecord Record:=acNewRec
Me.[CustomerID] = ![CustomerID]
Me.[VendorID] = ![VendorID]
' ... etc
End With
End Sub
 
-----Original Message-----
Hi Josh

There are several ways to do this, so here is one possibility: synch your
form's RecordsetClone to the current record and then navigate to a new
record and copy all the required fields across:

Private Sub cmdClone_Click()
With Me.RecordsetClone
.Bookmark = Me.Bookmark
DoCmd.GoToRecord Record:=acNewRec
Me.[CustomerID] = ![CustomerID]
Me.[VendorID] = ![VendorID]
' ... etc
End With
End Sub

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand
Thanks! I will give it a shot.

.
 
Back
Top