I have the following code on the OnCurrent event of the a subform.
This determines which record gets displayed on another subform. However, when I open the parent form I get the error, you entered an expression that has an invalid reference...
I have added the code to the onload event as well to the subform that filters out the records
Code:
Me.Parent.cboLeadID = Me.LeadID
Forms!frmDriller!frmDrillerSubForm.Requery
Forms!frmDriller!frmNotesSub.Requery
If Forms!frmDriller!frmDrillerSubForm!chkJoint = True Then
Forms!frmDriller!pgJointDetails.Visible = True
Forms!frmDriller!frmDrillerSubForm.Form!LeadsLabel.Caption = Forms!frmDriller!frmDrillerSubForm.Form!Title & " " & Forms!frmDriller!frmDrillerSubForm.Form!Firstname & " " & Forms!frmDriller!frmDrillerSubForm.Form!Surname & " " & "&&" & " " & Forms!frmDriller!Child106.Form!Title & " " & Forms!frmDriller!Child106.Form!Firstname & " " & Forms!frmDriller!Child106.Form!Surname
Else
If IsNull(Forms!frmDriller!frmDrillerSubForm!chkJoint) Then
Forms!frmDriller!pgJointDetails.Visible = False
Forms!frmDriller!frmDrillerSubForm.Form!LeadsLabel.Caption = Forms!frmDriller!frmDrillerSubForm.Form!Title & " " & Forms!frmDriller!frmDrillerSubForm.Form!Firstname & " " & Forms!frmDriller!frmDrillerSubForm.Form!Surname
End If
End If
This determines which record gets displayed on another subform. However, when I open the parent form I get the error, you entered an expression that has an invalid reference...
I have added the code to the onload event as well to the subform that filters out the records