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
 

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

Back
Top