Paste Current Record To New Record - Button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like a button that would open a new record and paste "some" of the
current records' information. Can this be done? Can this be done naming the
fields to paste instead of copying all the record data?
 
Hi, Bexar.

Sure. Copy the values from the current record to variables, move to a new
record, and then assign the variable values to the new record. For example,

Dim varMaterial As Variant
Dim varToday As Variant

varMaterial = Me![Material]
varToday = Me![Today]

DoCmd.GoToRecord , , acNewRec

Me![Material] = varMaterial
Me![Today] = varToday

Hope that helps.
Sprinks
 
Thank you very much. It works GREAT!

Sprinks said:
Hi, Bexar.

Sure. Copy the values from the current record to variables, move to a new
record, and then assign the variable values to the new record. For example,

Dim varMaterial As Variant
Dim varToday As Variant

varMaterial = Me![Material]
varToday = Me![Today]

DoCmd.GoToRecord , , acNewRec

Me![Material] = varMaterial
Me![Today] = varToday

Hope that helps.
Sprinks

Bexar1 said:
I would like a button that would open a new record and paste "some" of the
current records' information. Can this be done? Can this be done naming the
fields to paste instead of copying all the record data?
 
Back
Top