I am trying to switch views based on a Queried value using VBScript. The following is my Script followed by the error message I get when I try to Preview the form.
ScriptSub XDocument_OnSwitchView(eventObj)
If
http://d:Person/@cd_Sex = "M" Then,
XDocument.View.SwitchView(MaleExam)Or
If
http://d:Person/@cd_Sex = "F" Then,
XDocument.View.SwitchView(Female_Exam)
End Sub
Error MessageInfoPath cannot open the selected form because of an error in the form's code.
The following error occurred:
Expected 'Then'
File:script.vbs
Line:50
If
http://d:Person/@cd_Sex = "M" Then,
Any assistance would by greatly appreciated.
Thanks
Smitty