G
Guest
Howdy from Oklahoma!
I am just learning ACCESS and the people here have helped me alot!!!
But I now have a Dlookup problem where my result may not be in the table
that I am querying. But when the result is not in the table the [field] that
I am looking up does not show to be NULL.
I then have a IF/THEN statement that I need to do an action if the lookup
[field] has a value and if the the result is not in the table then I need it
to do a different action. I cannot get the IF statement to identify if the
result is not in the table using the "[field]= NULL". Below is the skeleton
of the statement I am trying to run:
Dim Test As Variant
Test = DLookup("[quantity]", "tbl_inventory", "[product#] =
Forms![frm_pohdrecv]![frm_POLNsub].[Form]![Prodno]")
If Test <> Null Then
MsgBox ("Add New Inventory")
Else
MsgBox ("Add Quantity")
End If
End
Any assistance to this would be greatly appreciated on getting past this
delima!!!
And as always THANKS IN ADVANCE!!!!
Chip
I am just learning ACCESS and the people here have helped me alot!!!
But I now have a Dlookup problem where my result may not be in the table
that I am querying. But when the result is not in the table the [field] that
I am looking up does not show to be NULL.
I then have a IF/THEN statement that I need to do an action if the lookup
[field] has a value and if the the result is not in the table then I need it
to do a different action. I cannot get the IF statement to identify if the
result is not in the table using the "[field]= NULL". Below is the skeleton
of the statement I am trying to run:
Dim Test As Variant
Test = DLookup("[quantity]", "tbl_inventory", "[product#] =
Forms![frm_pohdrecv]![frm_POLNsub].[Form]![Prodno]")
If Test <> Null Then
MsgBox ("Add New Inventory")
Else
MsgBox ("Add Quantity")
End If
End
Any assistance to this would be greatly appreciated on getting past this
delima!!!
And as always THANKS IN ADVANCE!!!!
Chip