What am I doing wrong?
After adding new subject (ID) to form 1, I want to add this new ID record to form 2, but the error appears to be in line 3. And, what is the equivalent OpenArgs statement for this?
Private Sub Command226_Click()
On Error GoTo Err_Command226_Click
Forms![form1]![form2].SetFocus
DoCmd.GoToRecord acActiveDataObject, , acNewRec
Forms![form1]![form2]![ID] = Forms![form1]![ID]
Exit_Command226_Click:
Exit Sub
Err_Command226_Click:
MsgBox Err.Description
Resume Exit_Command226_Click
End Sub
Best Regards,
debo
After adding new subject (ID) to form 1, I want to add this new ID record to form 2, but the error appears to be in line 3. And, what is the equivalent OpenArgs statement for this?
Private Sub Command226_Click()
On Error GoTo Err_Command226_Click
Forms![form1]![form2].SetFocus
DoCmd.GoToRecord acActiveDataObject, , acNewRec
Forms![form1]![form2]![ID] = Forms![form1]![ID]
Exit_Command226_Click:
Exit Sub
Err_Command226_Click:
MsgBox Err.Description
Resume Exit_Command226_Click
End Sub
Best Regards,
debo