开发者

MS Access 2007 text box values validate

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...


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜