A validation rule required.

khuram

New member
Local time
Yesterday, 17:21
Joined
Jan 25, 2010
Messages
1
Respected All,

I have a table with two fields SupplierID and AccountID.

I need a validation rule that if SupplierID is "Cash Supplier" then AccountID is NOT NULL and default value for AccountID is "Cash"

Thanks in anticipation.

Regards!
 
Respected All,

I have a table with two fields SupplierID and AccountID.

I need a validation rule that if SupplierID is "Cash Supplier" then AccountID is NOT NULL and default value for AccountID is "Cash"

Thanks in anticipation.

Regards!


What you are requiring isn't a validation, but rather an action. Paste this into the AfterUpdate event of SupplierID:

IIf(Trim(SupplierID) = "Cash Supplier", AccountID = "Cash", AccountID = "")
 
What you are requiring isn't a validation, but rather an action. Paste this into the AfterUpdate event of SupplierID:

IIf(Trim(SupplierID) = "Cash Supplier", AccountID = "Cash", AccountID = "")
I would do this in a form. You can't do it with table level validation.
 

Users who are viewing this thread

Back
Top Bottom