We help IT Professionals succeed at work.

VBScript To Add Blank In A Field

Gina Bautista
I need a vbscript code that will look in a field, find < > and make the field blank if it finds the "<" or ">"

If field5 contains "<" or ">", then make field blank or empty.
Watch Question

Try the following but using the name of your form in place of "TheForm" and of course the right field name in the case its not actually called field5..

If InStr(TheForm.field5.Value,"<") > 0 Or InStr(TheForm.field5.Value,">") > 0 Then TheForm.field5.Value = ""

Open in new window

Gina BautistaI.T. Systems Administrator


Excellent and quick!  I appreciate the help.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.