Bharat_Naik wrote on Mar 4
th, 2009 at 4:42am:
Hi Carl,
On form change event, this code runs every time any element in the form changes. It will keep on firing every time enter or change data. Let's see, you entered the form and changed something or on Form entry programming changed something and Check box is checked automatically. Now you go and unchecked that box. You change something else in the form and checkbox will be checked again. Well, that is what I think!!
Not so, the @IsBlank conditional will ONLY allow a change if it's blank; which means this can only happen the first time you ever make a change to the form, and never again (unless you deliberately clear the element in question).
Quote:This code should be on On Form Entry event for it to work properly and preferably with @IsNew condtional...
This does not work for the first line item in a table-view subform. Plus, it will cause a new line item to be created every time you press the down arrow, even if all the other fields are left blank.
Quote:Is "0" considered blank? Possibly not.
No, it's considered to have a value. @IsBlank will work with a Boolean field the way you would expect it to.
Quote:If Reconcile <> 1 then
{
Reconcile = 1
}
You wouldn't want to use this for an initial value, because it would change it to "1" no matter what state the field was in.