Hi all,
This is the first time I'm working with Infopath (2007), and it's not going as expected :-(
Before saving a form, I have to validate a few fields (in vb). If one of the fields contains invalid data, an error message appears and the focus has to be set to that specific field.
The last part seems to be a problem.
I've already searched this forum, and I found several solutions which unfortunately don't work.
Public Sub btnSave_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)
Dim WTG As String = Me.CreateNavigator().SelectSingleNode("/ns1:Boatlanding/WTG", Me.NamespaceManager).Value
If WTG = "" or WTG = "64" Then
MessageBox.Show("WTG is required")
-- Set focus back to WTG ---
Return
End If
...
End sub
Can someone please help me ?
Thanks,
Ingrid