Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Ambient properties

Posted on 1999-01-01
4
Medium Priority
?
444 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 280 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

963 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