Calling VBA functions in an Access database from an ASP page 
Author Message
 Calling VBA functions in an Access database from an ASP page

If I have a function in the VBA project of an Access
database, is there a way to execute the function via a ASP
script? In other words, is it possible to open a
connection to the .mdb file and then call the function? I
have several functions in a .mdb file that I would like to
call in such a manner without having to convert them to
VBScript.


Thu, 03 Mar 2005 03:38:23 GMT  
 Calling VBA functions in an Access database from an ASP page
You should be able to do something along this line. I don't really have anything to test with right
now so the OpenFunction syntax may not be exactly correct.

    Set appAccess = CreateObject("Access.Application")
    appAccess.DoCmd.OpenFunction "Module1.SomeFunction()"
    appAccess.Quit
    Set appAccess = Nothing

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Client/ User Interface]

Quote:

> If I have a function in the VBA project of an Access
> database, is there a way to execute the function via a ASP
> script? In other words, is it possible to open a
> connection to the .mdb file and then call the function? I
> have several functions in a .mdb file that I would like to
> call in such a manner without having to convert them to
> VBScript.



Thu, 03 Mar 2005 04:08:47 GMT  
 Calling VBA functions in an Access database from an ASP page
  Oops... missed a couple lines.

  Const strConPathToDB = "G:\data\Access\mydb.mdb"
    Set appAccess = CreateObject("Access.Application")
    appAccess.OpenCurrentDatabase strConPathToDB
    appAccess.DoCmd.OpenFunction "Module1.SomeFunction()"
    appAccess.Quit
    Set appAccess = Nothing

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Client/ User Interface]



Thu, 03 Mar 2005 04:23:18 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Unsuccesful kernel32 function (CallNamedPipe) call from ASP page.

2. Calling query using VBA function via ASP

3. Calling query using VBA function via ASP

4. WSH calls VBA or VBA calls WSH

5. Calling VBA modules in Access Data Pages

6. Call Access VBA functions from VB6.0

7. populating asp page with access database query ?

8. Object Cannot Access Database After Compiled When Called From ASP

9. calling access querydef that calls a user defined access function

10. Open Access Database with Jscript in ASP page

11. Call a VBScript from Access 2000 VBA

12. calling/running MS Access module from ASP pages

 

 
Powered by phpBB® Forum Software