Solved

Ambient properties

Posted on 1999-01-01
4
435 Views
Last Modified: 2013-12-25
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?
0
Comment
Question by:TheQ111798
  • 2
4 Comments
 

Expert Comment

by:gosborne
ID: 1489346
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.
0
 

Accepted Solution

by:
sulli earned 70 total points
ID: 1489347
.ku
0
 

Expert Comment

by:Ajoy
ID: 1489348
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
0
 

Expert Comment

by:gosborne
ID: 1489349
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
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now