Hi,
I have a standard module that is meant to verify if certain fields are blank but when my class module calls the standard module, the IF statements in the standard module aren’t running even though the condition is satisfied. I even checked the debugger to be sure the field is Null. Please advise as I’ ve done only minimal standard module coding before this time.
CLASS MODULE CODE:
If Me.TotalPays <> 0 Then
Call verifyCPRMain(ctrlname, lblcaption)
End If
STANDARD MODULE CODE:
Dim ctrlname As String, lblcaption As String
Dim arg1 As String, arg2 As String
Option Compare Database
Option Explicit
Sub verifyCPRMain(arg1, arg2)
If Forms![data entry]![cpr.dateentered] = Null Then
arg1 = [Forms]![data entry]![CPR_dateentred]
arg2 = [Forms]![data entry]!Label37
Call isBlank(ctrlname, lblcaption)
End If
If [Forms]![data entry]!EventResults = Null Then
arg1 = [Forms]![data entry]!EventResults
arg2 = [Forms]![data entry]!Label38
Call isBlank(ctrlname, lblcaption)
End If
End Sub
I have a standard module that is meant to verify if certain fields are blank but when my class module calls the standard module, the IF statements in the standard module aren’t running even though the condition is satisfied. I even checked the debugger to be sure the field is Null. Please advise as I’ ve done only minimal standard module coding before this time.
CLASS MODULE CODE:
If Me.TotalPays <> 0 Then
Call verifyCPRMain(ctrlname, lblcaption)
End If
STANDARD MODULE CODE:
Dim ctrlname As String, lblcaption As String
Dim arg1 As String, arg2 As String
Option Compare Database
Option Explicit
Sub verifyCPRMain(arg1, arg2)
If Forms![data entry]![cpr.dateentered] = Null Then
arg1 = [Forms]![data entry]![CPR_dateentred]
arg2 = [Forms]![data entry]!Label37
Call isBlank(ctrlname, lblcaption)
End If
If [Forms]![data entry]!EventResults = Null Then
arg1 = [Forms]![data entry]!EventResults
arg2 = [Forms]![data entry]!Label38
Call isBlank(ctrlname, lblcaption)
End If
End Sub