Custom Create a New Record

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

Guest

Hello,

I need to make a command that duplicates a record, but before creating the
new records, asks for a new "Job Name" then changes the Related Feilds
throughout the form.

Is this possible?
 
Yes. One way to do this is put the value of each control in the control's
Tag property. Then go to a new record and put the Tag value back in the
control.

Private Sub cmdDupRec_Click()

With Me
.AControl.Tag = .AControl.Value
.AnotherControl.Tag = .AnotherControl.Value
End With

DoCmd.GoToRecord , , acNewRec

With Me
.AControl = .AControl.Tag
.AnotherControl = .AnotherControl.Tag
End With

Me.txtJobNumber.SetFocus

End Sub
 
Back
Top