Custom form has hidden field requiring a value

T

tracy.england

and when I run the form and hit SEND, I get error "A
field on this form requires a value". I've spent hours
trying to find it and cannot. Anyone know how I can run
a search, or something to find this field....???

HELP!
 
S

Sue Mosher [MVP]

There's no easy way to retrace your steps on this issue. Did you add a field
to the form, then remove it? If so, add it back, then check its control for
a validation formula.

You can write code to loop through the UserProperties collection and check
each property's ValidationFormula value, but that won't help if you added
validation to a built-in property.
 
T

Tracy

Can you give me help on this search for UserProperties
and ValidationFormulam, without a whole programming
lesson? It would be much appreciated and may perhaps
solve the problem...

Tracy
 
S

Sue Mosher [MVP]

With only the form open, run this code:

Sub CheckProps
On Error Resume Next
Set objOL = CreateObject("Outlook.Application")
Set objItem = objOL.ActiveInspector.CurrentItem

For Each userProp in objItem.UserProperties
If userProp.ValidationFormula <> "" Then
MsgBox userProp.Name & " has a validation formula"
End If
Next

Set objItem = Nothing
Set userProp = Nothing
Set objOL = Nothing
End Sub

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top