Correct Referencing in Form/Sub form

khwaja

Registered User.
Local time
Today, 23:24
Joined
Jun 13, 2003
Messages
254
I have following forms:

frmSHE - parent
frmSHEMain- first sub form
frmSHEMainSF - second sub form
frmPerson - a sub form of frmSHEMainSF

I am trying to use a value within the frmSHEMainSF to ensure that users after selecting an incident type always fill a field (name) on the frmPerson using the before update event in this form.

I have used the following systax but it does not quite work. Will appreciate some help.

If Me.IncType = " Incident Resulting in Injury" And IsNull(Forms!frmSHE!frmSHEMain.Form!frmSHEMainSF.Form!frmPerson.Name) Then
MsgBox "You must enter personal details to create this incident!"


Cancel = True

frmPerson.Name.SetFocus

Exit Sub
End If
 
Thanks. The link to the file is broken. Will appreciate if someone could help.
 

Users who are viewing this thread

Back
Top Bottom