Scott
Nice to hear from you again
Rules do not work due to the overlap of membership of the groups.
Reason for setting default is that certain actions close the form and open
up a new one i think it would be quite useful to have their form as the
default. PS I saw a post from Brisk in reply to one of my queries regarding
this and he said that is what he uses the code to do, so i think it is a kind
of failsafe.
Cheers Adam
> Hi Adam,
>
[quoted text clipped - 11 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights
Scott L. Heim [MSFT] - 24 Aug 2005 17:03 GMT
Hi Adam,
Let's start with this and see how close we get to what you need:
- Open your form in Design View
- From the Tools menu choose Programming and then select: On Load Event -
you should see the following:
function XDocument::OnLoad(eventObj)
{
}
- Add this code between the braces:
var strCurrentRole = XDocument.Role;
if(strCurrentRole == "Role 2")
{
XDocument.ViewInfos("View 2").IsDefault = true;
}
** NOTE: You will need to change Role 2 to one of your Role names and View
2 to the appropriate View name.
- For now, let's test with just this one role - does it switch properly
when the user opens the form? If so, we will need to add additional logic
to this sample to include the other roles.
Thanks,
Scott L. Heim
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights