I need to update one field based on the entry in one or more other fields. The scenario is that we have an incident "state" field, which will be a value between 1 and 4. The value for "state" corresponds to a series of date fields on the form. Right now, "state" is a manual field, but we're finding that user's forget to update it when filling in one of the date fields.
The correspondence is:
State one - "reported date" filled in (and no others)
state two - "verified date" filled in (and no others)
state three - "work started" or "work completed" or "2nd verification" or
"delivered" or "accpeted" filled in (one or all can be filled in to qualify).
state four - this is an on-hold state and can only be assigned manually
What I want to do is add some code to the On Update property for each of the date fields that will check to see if the date is filled in (and others are not, as
appropriate) and update the "state" field to the correct value. What kind of code/macro do I use? Is a code example available?
The correspondence is:
State one - "reported date" filled in (and no others)
state two - "verified date" filled in (and no others)
state three - "work started" or "work completed" or "2nd verification" or
"delivered" or "accpeted" filled in (one or all can be filled in to qualify).
state four - this is an on-hold state and can only be assigned manually
What I want to do is add some code to the On Update property for each of the date fields that will check to see if the date is filled in (and others are not, as
appropriate) and update the "state" field to the correct value. What kind of code/macro do I use? Is a code example available?