Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"There is no object in this control." 1

Status
Not open for further replies.

seaport

MIS
Jan 5, 2000
923
US
I got this error message - &quot;There is no object in this control.&quot; when opening a form that has a common dialog control. Also, all properties and methods about this controls do not work. Actually, this control works OK on some machines. What's the problem?<br><br>There might be two reasons, I think.<br>1. I may need to add reference about this common dialog control. (This reason does not sound right since I can not ask every user to add reference before they use my database on their machine.)<br>2. I do not have licence to use this control. (I imported a form with the common dialog control into my database and modified it.)<br><br>
 
The message is probably your first guess.&nbsp;&nbsp;If you open the form you'll probably see blank placeholder where the commdlg control used to be on the form. If you create a setup program, it will add the control. If not, you can put a few lines of code to add it:<br><br>put this in declarations:<br>Declare Function&nbsp;&nbsp;&quot;DllRegisterServer&quot; Lib &quot;COMDLG32.OCX&quot;&nbsp;&nbsp;() As Long<br>It's a good idea to alias this though, since the same fcn is in most (all?) ocx's:<br><br>Declare Function &quot;myownComdlgReReg&quot;&nbsp;&nbsp;&nbsp;Lib &quot;COMDLG32.OCX&quot; Alias &quot;DllRegisterServer&quot;&nbsp;&nbsp;() As Long<br><br>Then assure the file is in the system directory, and call it:<br><br>dim x<br>x = myowncommdlgrereg()<br><br>--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top