E
Emma Aumack
I am trying to require that users make a selection from an option frame by
using the following code in the On Exit event of the option frame. If an
option is selected it put either a 1 or 2 inthe LOC_IndIDN field:
Private Sub Frame_IndorIDN_Exit(Cancel As Integer)
Cancel = func_FieldRequired(Nz(Me!LOC_IndIDN, 0), Me!LOC_IndIDN.Value)
End Sub
In Module1 is the following code for func_FieldRequired:
Public Function func_FieldRequired(FieldX As Integer, FieldXName As String)
As Boolean
If Len(FieldX) = 0 Then
'If it is empty popup appears
msgbox "You must fill in the " & FieldXName & " box.", , "Entry
Required"
func_FieldRequired = True
Else
func_FieldRequired = False
End If
End Function
I keep getting "Invalid use of null" error.
What is wrong with my code?
using the following code in the On Exit event of the option frame. If an
option is selected it put either a 1 or 2 inthe LOC_IndIDN field:
Private Sub Frame_IndorIDN_Exit(Cancel As Integer)
Cancel = func_FieldRequired(Nz(Me!LOC_IndIDN, 0), Me!LOC_IndIDN.Value)
End Sub
In Module1 is the following code for func_FieldRequired:
Public Function func_FieldRequired(FieldX As Integer, FieldXName As String)
As Boolean
If Len(FieldX) = 0 Then
'If it is empty popup appears
msgbox "You must fill in the " & FieldXName & " box.", , "Entry
Required"
func_FieldRequired = True
Else
func_FieldRequired = False
End If
End Function
I keep getting "Invalid use of null" error.
What is wrong with my code?