dhemple
asked on
MS Access code update that will allow identifation of blank or null values during import
Hello Experts. I need your help to change the below Function code to also allow for null or blank values. Currently the code updates chk1 to True when there is a date, but does not update chk1 to True when null or blank.
Function chk1(A As String) As Boolean
'Check date
Dim i As Integer, l As Integer, c As String
A = Trim(A) 'remove possible spaces
chk1 = False
If IsDate(A) Then chk1 = True
If IsNull(A) Then chk1 = True 'I inserted this line, but it does not work
End Function
Function chk1(A As String) As Boolean
'Check date
Dim i As Integer, l As Integer, c As String
A = Trim(A) 'remove possible spaces
chk1 = False
If IsDate(A) Then chk1 = True
If IsNull(A) Then chk1 = True 'I inserted this line, but it does not work
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for your assistance with this question.
By default, arguments are passed by reference (ByRef) that means a pointer is passed rather than a copy of the variable. So, your code when it changes A, is changing A in the calling procedure.