The following code is in the Load event of a form. It doesn't even execute the code, and the form doesn't open.
As you will see, I am passing a value from one of two forms ( the same field value ), to the variable 'refnum'. It is important I differentiate between the calling or 'opening' forms, as this value will vary. The syntax for storing the right field value in 'refnum' is correct, as I have checked this, but as soon as I place the 'If' branches into the code, it hangs/does not load the form. Any ideas please ?
Code:
If [Forms]![FrmNavigationLeft].[Form]![NavigationSubform].[Form]![NavigationSubform].[Form].[Name] = "frmClosures" Then
rfnum = [Forms]![FrmNavigationLeft].[Form]![NavigationSubform].[Form]![NavigationSubform].[Form].[Referral_Num]
Else
rfnum = Forms!FrmNavigationLeft!NavigationSubform.Form!NavigationSubform!sfrmReferrals.Form!Referral_Num
End If
As you will see, I am passing a value from one of two forms ( the same field value ), to the variable 'refnum'. It is important I differentiate between the calling or 'opening' forms, as this value will vary. The syntax for storing the right field value in 'refnum' is correct, as I have checked this, but as soon as I place the 'If' branches into the code, it hangs/does not load the form. Any ideas please ?
