One more question:
I was reading about the Role property in the help file and it said that it could be used to either read or set the current user's role. I used it to change the user's role within a form and it worked (I used a button that displayed an alert with the user's current role, which was the default role, changed the role, then displayed another alert to show the updated role). However, when I submitted this form to an email address and opened it up, the role and reverted back to the default.
I looked around the help file some more and found the roles element, which looks promising, but I don't know how to manipulate it. So my question is:
1. If I change the user's role in the membership element of the roles element, will this change permanant (i.e. would it be the same as if I changed the user role manually)?
2. If so, how do I go about about changing the user's role in the membership element?
I know I'm going to have to use the username element to do this, which means I'm going to have to get the current user's name. I tried the Active X method explained here:http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=173. Once I have this information, though, how do I go out, find the username element with the correct user name, and update it to reflect the new role?
OK, I guess that was a few questions, but any input you could provide would be greatly appreciated.