-
Solved: Outlook forms and validation
Hi all
I am working on a small outlook form, and I would like Outlook to validate if a specific textbox are empty or not when the user presses on the Send button.
I tried to use the validation under properties for the textbox, but it doesn?t set focus on the textbox that is empty, it just says that something is missing.
I like code to do something like this when the ?Item_Send? is used
if textbox1.value="" then
msgbox bla.
textbox1.setfocus
end if
I am totally new in creating customs form with VBS, so any help is fine
Regards Rico
-
Rico
Have you tried that code?
It's basically correct and should go in the send button's click event.
If you double click the send button then you should get the click event.
By the way what validation for the textbox do you mean?
-
Hi Norie
I found a solution which look like this
[VBA]
Function Item_Write()
Set objPage = Item.GetInspector.ModifiedFormPages("Message")
Set objControl = objPage.Controls("MyTextBoxs")
If objPage.Controls("MyTextBoxs") = "" Then
Item_Write = False
MsgBox "Please insert text in MyTextbox."
ObjControl.SetFocus
End If
End Function
[/VBA]
Sorry If my english is a bit rusty :-)
With validation I meant, when you rigth click on a textboxs and choose Properties (Edit mode for the form) here you can set some validation properties.
Regards Rico
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules