0
votes

I have an access form in which i enter some values...here once i enter n goto next textbox i want to check if the quantity entered in the text box is less than a value from a field in some table. i saw the option validation rule but dont knw how to check with a table value...thanks in advance...

1

1 Answers

0
votes

The usual way to check against a table is DLookUp:

If Me.txtText = _
   DLookUp("Field_OrExpression","SomeTable","Optional_Where_Statement") Then

Note that DLookup returns Null if the data is not found.

-- http://support.microsoft.com/kb/208786