D
Danielle Sturgess
I am attempting to perform a data validation (for part inspections) by
checking measurements against a validation table. I'm trying to use the
DLookup function to get 2 values but the code isn't working. I get an
"Invalid use of Null" error:
Dim min As Variant
Dim max As Variant
min = dlookup("[MinValue]", "tblValidation", "[Measurement] =" &
"Perpendicularity")
max = dlookup("[MaxValue]", "tblValidation", "[Measurement] =" &
"Perpendicularity")
If Me![Perpendicularity] < min Then
docmd.openform "frmWarning"
else
If Me![Perpendicularity] > max Then
docmd.openform "frmWarning"
end if
end if
Any ideas? In the tables, all fields in the code are Number fields and are
Double, not the default Long Integer.
Thanks!
checking measurements against a validation table. I'm trying to use the
DLookup function to get 2 values but the code isn't working. I get an
"Invalid use of Null" error:
Dim min As Variant
Dim max As Variant
min = dlookup("[MinValue]", "tblValidation", "[Measurement] =" &
"Perpendicularity")
max = dlookup("[MaxValue]", "tblValidation", "[Measurement] =" &
"Perpendicularity")
If Me![Perpendicularity] < min Then
docmd.openform "frmWarning"
else
If Me![Perpendicularity] > max Then
docmd.openform "frmWarning"
end if
end if
Any ideas? In the tables, all fields in the code are Number fields and are
Double, not the default Long Integer.
Thanks!