Link to home
Start Free TrialLog in
Avatar of TheQ111798
TheQ111798

asked on

Ambient properties

I am checking a control with ambient.usermode, but I get an error of "client site not available". I would think a standard form supports this property. What could I be doing wrong?
Avatar of gosborne
gosborne

This depends on which event you are trying to check the usermode.

When creating a new instance of a control, you cannot use the ambient properties until the ReadProperties Event, which comes after Initialize and InitProperties.  Try checking the usermode in the ReadProperties Event.
ASKER CERTIFIED SOLUTION
Avatar of sulli
sulli

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
TheQ,
gosborne is right that it depends on the event ur puuting it in.
but u can put it also in the InitProperties event also.
regards,
ajoy
Thank you...this is correct, InitProperties only fires when you are creating an instance of a control (dropping on form, displaying a form in the design environment, etc.), but not when starting the container.  In actuality, if you want to perform a particular function at all times you would need to place this in both places or make a sub and call it from both places