G
Guest
I have the following sub that calls a function, which works great if errors
are found, but if none are found, I get an error: "You cancelled the previous
operation." What am I doing wrong, I thought 'DCount' would return NULL if
none are found...?
Private Sub Check_Errors()
Dim varErrs as Variant
varErrs = ResolveErrors
If varErrs Is Null Then Exit Sub
{other code here}
End Sub
Private Function ResolveErrors() As Variant
ResolveErrors = DCount("*", [pcstrTableMerge], "[RPT_CODE] IS NULL")
End Function
are found, but if none are found, I get an error: "You cancelled the previous
operation." What am I doing wrong, I thought 'DCount' would return NULL if
none are found...?
Private Sub Check_Errors()
Dim varErrs as Variant
varErrs = ResolveErrors
If varErrs Is Null Then Exit Sub
{other code here}
End Sub
Private Function ResolveErrors() As Variant
ResolveErrors = DCount("*", [pcstrTableMerge], "[RPT_CODE] IS NULL")
End Function