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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
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.