Hello Everyone:
I am trying to open a form and add a new record with information from the previous form which displayed the data.
I have this, which opens a new form, but it is blank. How can I get it to put the data in the previous form's field into the new form's field?
Private Sub AddByLaw_Click()
On Error GoTo Err_AddByLaw_Click
Dim stDocName As String
stDocName = "FrmBy_Law_Case"
DoCmd.OpenForm stDocName, , , Forms!FrmPhoneCalls_By_Laws!.Phone_Log = " &Me![PhoneID}"
Exit_AddByLaw_Click:
Exit Sub
Err_AddByLaw_Click:
MsgBox Err.Description
Resume Exit_AddByLaw_Click
End Sub
I am trying to open a form and add a new record with information from the previous form which displayed the data.
I have this, which opens a new form, but it is blank. How can I get it to put the data in the previous form's field into the new form's field?
Private Sub AddByLaw_Click()
On Error GoTo Err_AddByLaw_Click
Dim stDocName As String
stDocName = "FrmBy_Law_Case"
DoCmd.OpenForm stDocName, , , Forms!FrmPhoneCalls_By_Laws!.Phone_Log = " &Me![PhoneID}"
Exit_AddByLaw_Click:
Exit Sub
Err_AddByLaw_Click:
MsgBox Err.Description
Resume Exit_AddByLaw_Click
End Sub