L
Laurel
The "Bad Address" column in the tblRLC table is a Yes/No datatype. When I
look at the contents of the table, some have this column checked and some
don't. But when I execute the code below, lv_variant is ALWAYS 0. At first
I tried testing to see if it were True instead of testing for 0, but that
was never true. With the current code, no matter what the value in [Bad
Address], the function returns "BAD ADDRESS". If I test for True instead
of 0, fncBadAddress is always = to "". What am I doing wrong?
Dim lv_variant As Variant
fncBadAddress = ""
lv_variant = DLookup("[Bad Address]", "tblRLC", "Directory_HHD_Key =
True")
If DLookup("[Bad Address]", "tblRLC", "Directory_HHD_Key = True") = 0
Then
fncBadAddress = "BAD ADDRESS"
End If
look at the contents of the table, some have this column checked and some
don't. But when I execute the code below, lv_variant is ALWAYS 0. At first
I tried testing to see if it were True instead of testing for 0, but that
was never true. With the current code, no matter what the value in [Bad
Address], the function returns "BAD ADDRESS". If I test for True instead
of 0, fncBadAddress is always = to "". What am I doing wrong?
Dim lv_variant As Variant
fncBadAddress = ""
lv_variant = DLookup("[Bad Address]", "tblRLC", "Directory_HHD_Key =
True")
If DLookup("[Bad Address]", "tblRLC", "Directory_HHD_Key = True") = 0
Then
fncBadAddress = "BAD ADDRESS"
End If