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 Mike Lewis 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 fix with VBA on load.

Status
Not open for further replies.

Luzbel

IS-IT--Management
Apr 20, 2007
45
PR
I created an access application using the datetime picker activex control (mscomct2.ocx). I've noticed that if I run a form with the object and the ocx file hasn't been registered (even after I register it on the pc) it will not load unless I replace the access application. Usually I get the message: "There is no object in this control". I need to know if there is a vba command I can run when the application loads (Before opening the form with the ActiveX Control) that checks if the ocx reference is not missing and/or registered so that if it is display a message and close Access. Most PCs do not have administrator privileges. The mdb file is on a shared folder which is accessed with PCs with access 2003 and 2007.
 
How are ya Luzbel . . .

Having a db that is not split in the share folder is a [red]very bad Idea[/red] (highly possible its the cause of the problem).

You need to at least [blue]split the db[/blue]. The [blue]BackEnd[/blue] goes in the share folder, while the [blue]FrontEnd[/blue] is distributed to each users Machine.

[blue]Your Thoughts? . . .[/blue]

BTW: Welcome to [blue]Tek-Tips![/blue] [thumbsup2] Do have a look at one of the links at the bottom of my post. The links will help you [blue]ask better questions[/blue], get [blue]quick responses[/blue], [blue]better answers[/blue], and insite into [blue]etiquette[/blue] here in the forums. Again . . . Welcome to [blue]Tek-Tips![/blue] [thumbsup2] [blue]Its Worthy Reading![/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
I have been reading a lot about having the front end locally. I will analyze this later or on another post. Thanks for that.
Either way back to my post…

I would like to know if there is a way to check if a specific OCX is registered via VBA on a machine without administrative privileges.
 
Luzbel . . .

If the .ocx is registered in access, use the references object/collection:
Code:
[blue]   Dim Ref As Reference
   
   For Each Ref In Application.References
      Debug.Print Ref.Name
   Next[/blue]
You should be able to modify the above to suite your needs.

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top