Thank you mgarant.
I tried this too but I'm getting an error message regarding 'e'...I think this code is for Jscript/infopath 2007? We are still using Infopath 2003 (sorry I forgot to mention in my original post). However, using this example I found something for infopath 2003 (http://support.microsoft.com/kb/826997) but the example is in jscript or was it c#. I tried converting it so vbscript. I got the defaultview to work on the OnLoad event but I can't switch it to my "reminder" view. I could be doing it wrong too. Here's what I have:
In my Sub XDocument_OnLoad(eventObj), I have:
Dim objDefaultView
objDefaultView = XDocument.DOM.selectSingleNode("//my:field1")
if objDefaultView = false Then
XDocument.ViewInfos("Main").IsDefault = true
else
XDocument.ViewInfos("Reminder").IsDefault = true
end if
The "field1" is a check box set to "false" by default.
In my OnClick button, I added:
XDocument.DOM.selectSingleNode("//my:field1").text = "true"
This seems to check the field1 box but it doesn't do anything. It doesnt change the view before or after the 2 dialog boxes appeared.
Any help or guidance is greatly appreciated. Thanks in advance.