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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

novice2001

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
The following source code is in a module:

Public gDDApp As Datadicky.clsDDApp 'declaration
..
..
Public Function Main()
Set gDDApp = Nothing
Set gDDApp = New Datadict.clsDDApp
gDDApp.Application = Access.Application
End Function

Assuming I have a dll called 'datadict' containing a class called 'clsDDApp', why should the last statement(gDDApp.Application = Access.Application ) not function??
kingsley

 
Access.Application is an object variable, it should be "set"

like this:

set gDDApp.Application = Access.Application
or
set gDDApp.Application = new Access.Application
 
Besides that, the Application property is read-only. You can't assign anything to it, nor do you need to. What are you trying to do this for? Rick Sprague
 
I have managed to find out that I had to use:
gDDApp.Application = CreateObject("Access.Application")
then it works!!
What I'm doing generally is capsuling vba code alone into a dll which can then be called up outside of access. However, I have my own menubars...next problem!!Normally I refer to these by:
Application.MenuBar = strMenuBar
in VBA! however not even this helps:
gDDapp.Application.MenuBar = strMenuBar

where strmenubar is the name of the menubar as a string!
CAn u help me?
 
can anybody help please?? Urgent?? Any advise is most welcome!!Thanx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top