Help with copying data in fields

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,
 
G

Graham Mandeno

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
 
G

Guest

-----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.

.
 

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