Field validation issues

bknight
BronzeLounger
Posts: 1412
Joined: 08 Jul 2016, 18:53

Re: Field validation issues

Post by bknight »

The validation rule was implemented to prevent accidental key stroke values

Code: Select all

IIf([Type] Like "Buy*",([Quantity]>=0 Or [Quantity] Is Null) And ([QtyFilled]>=0 Or [QtyFilled] Is Null),([Quantity]<=0 Or [Quantity] Is Null) And ([QtyFilled]<=0 Or [QtyFilled] Is Null))
This code was half done not finished. It prevents a negative Quantity when a Buy* appears in the type field. What it needs is a Sell* to prevent positive Quantity, but I really got lost in all the parts and pieces. Now a new obstacle appeared when I wanted another different Type namely Expired or Assigned, mutually exclusive.

User avatar
HansV
Administrator
Posts: 78596
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Field validation issues

Post by HansV »

I hope it'll work for you!
Best wishes,
Hans