Validation rules

Sergio

Registered User.
Local time
Today, 09:41
Joined
Feb 28, 2002
Messages
42
How to create a validation rule on a quantity control of an invoice form, to prevent to make an invoice which quantity be more than existing stocks.

In general, how to create validation rules between two or more tables or queries.

Tks in advanced.
 
Try something along this line:

rstInStock = dbCurrent.OpenRecordset ("SELECT * FROM tblInventory WHERE StockItem = Item1")

If InvoiceForm!Item1 > rstInStock!AmountInStock Then
MsgBox "The value entered exceeds the amount in stock..."
End If
 

Users who are viewing this thread

Back
Top Bottom