Hello,
I have a form that consists of 5 subforms that the user picks from a prompt (to bring up the subform). In one of the subforms, I have a text field that verifies if the input has a combination of letters and numbers. The code is placed in the input validation. The problem i receive is that when I select from the prompt to bring up the subform, My error message comes up automatically. The form does not automatically refresh. I dont know what im doing wrong. Here’s my code.
This code works if the text field is used in a basic form.
letters := “A”:“B”:“C”:“D”:“E”:“F”:“G”:“H”:“I”:“J”:“K”:“L”:“M”:“N”:“O”:“P”:“Q”:“R”:“S”:“T”:“U”:“V”:“W”:“X”:“Y”:“Z”;
numbers := “0”:“1”:“2”:“3”:“4”:“5”:“6”:“7”:“8”:“9”;
msg := “Field must contain 2 letters and 5 numbers; total of 7 characters.”;
@If(@IsDocBeingSaved & @Contains(@UpperCase(@Text(InputNum));letters) & @Contains(InputNum;numbers) + @Length(InputNum) = 7; “(” + @Left(InputNum; 2);letters + ") " + @Right(InputNum; 5);numbers; InputNum);
@If(@Length(InputNum) = 7 | @Length(InputNum) = 7 & InputNum != “”;@Success;@Failure(msg))