Solved

Ambient properties

Posted on 1999-01-01
4
437 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 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