R
Rpettis31
I have a form that can generate another form with some of the data going to
the new form. The new form generates a new ID number which I want to retain
on the original form.
I tried this code line to get that result but I end up with an error-
!txtCarId = "CAR" & IdCar
txtCarId is on the first form -- IdCar is the value of the form that was
created I want on the original form..
Private Sub CAR_Click()
' Open CAR form to add new record
DoCmd.OpenForm "frmCar", DataMode:=acFormAdd
'Fill in corresponding information
With Forms!frmCar
!IssueId = "DMR-" & Me.DMRID
!ItemNumber = Me.ItemNumber
!ProblemDescription = Me.ProblemDescription
'!Description = Me.ItemDescription
!txtCarId = "CAR" & IdCar
End With
'Close Form
DoCmd.Close acForm, Me.Name, acSaveNo
the new form. The new form generates a new ID number which I want to retain
on the original form.
I tried this code line to get that result but I end up with an error-
!txtCarId = "CAR" & IdCar
txtCarId is on the first form -- IdCar is the value of the form that was
created I want on the original form..
Private Sub CAR_Click()
' Open CAR form to add new record
DoCmd.OpenForm "frmCar", DataMode:=acFormAdd
'Fill in corresponding information
With Forms!frmCar
!IssueId = "DMR-" & Me.DMRID
!ItemNumber = Me.ItemNumber
!ProblemDescription = Me.ProblemDescription
'!Description = Me.ItemDescription
!txtCarId = "CAR" & IdCar
End With
'Close Form
DoCmd.Close acForm, Me.Name, acSaveNo