I am trying to create a button which opens a form then takes the infrmation in 1 field from the existing form and inster it into the newly opened form (does this make sense?????). Here is the code that I used.
Dim stDocName As String
Dim stLinkCriteria As String
Dim faultno As String
faultno = Form_fault.Fault_Number
stDocName = "Current RMA"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
Form_Current_RMA.Fault_No = faultno
It works upto the point of creating new record, but after that I get an error "object required".
Any help would be great, thanks
Dim stDocName As String
Dim stLinkCriteria As String
Dim faultno As String
faultno = Form_fault.Fault_Number
stDocName = "Current RMA"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
Form_Current_RMA.Fault_No = faultno
It works upto the point of creating new record, but after that I get an error "object required".
Any help would be great, thanks