G
Guest
Greetings,
I am trying to synchronize a data entry form (Me) so that when the data
entry form opens, the "StudyID" value from a control on a subform
"sfrmEPStudy" of "frmMaster" is placed into the "StudyID" control on the data
entry form. The code shown below uses the "on open" event of the data entry
form. It first confirms that frmMaster is open which works fine. The problem
I'm having seems to be having it find the value of the "StudyID" control on
the subform "sfrmEPStudy". The code below givea me "Run-time error 424:
Object Required".
Private sub Form_Open(Cancel As Integer)
If IsOpen("frmMaster") Then
Me.StudyID.DefaultValue = frmMaster!sfrmEPStudy.Form!StudyID
End If
End Sub
If I plug a dummy value in, that dummy value is successfully placed into the
"studyID" control on the data entry form for example substituting:
Me.StudyID.DefaultValue = 19
Into the above code sets the StudyID control on the data entry form to "19".
Thanks for any help.
I am trying to synchronize a data entry form (Me) so that when the data
entry form opens, the "StudyID" value from a control on a subform
"sfrmEPStudy" of "frmMaster" is placed into the "StudyID" control on the data
entry form. The code shown below uses the "on open" event of the data entry
form. It first confirms that frmMaster is open which works fine. The problem
I'm having seems to be having it find the value of the "StudyID" control on
the subform "sfrmEPStudy". The code below givea me "Run-time error 424:
Object Required".
Private sub Form_Open(Cancel As Integer)
If IsOpen("frmMaster") Then
Me.StudyID.DefaultValue = frmMaster!sfrmEPStudy.Form!StudyID
End If
End Sub
If I plug a dummy value in, that dummy value is successfully placed into the
"studyID" control on the data entry form for example substituting:
Me.StudyID.DefaultValue = 19
Into the above code sets the StudyID control on the data entry form to "19".
Thanks for any help.