SteveS
Posts: 41
|
Posted: 03/05/2004, 1:41 PM |
|
Hi,
I have several Access 2000 macro's that I need to run from within an asp page - does anyone have a snippet of code that can call them?
(or do they need to be converted to VB and then called?)
Any ideas/suggestions much apprechiated.
regards,
Steve.
|
|
|
peterr
Posts: 5971
|
Posted: 03/05/2004, 8:24 PM |
|
MS Access doesn't expose macros and modules for external access (from VBScript). You would need to copy the code directly to ASP/VBScript files and test and modify there as needed.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
Peter Haider
|
Posted: 03/07/2004, 1:37 PM |
|
Steve, here is the solution for your problem (i have had the same request)
1) Configure your requested office component as described in the article: http://support.microsoft.com/default.aspx?scid=kb;EN-US;288366
2) insert - for example - the following code into your asp / vbscript
application (tested by myself - works well)
....
Dim A2kApp
Dim A2kCmd
Set A2kApp = Server.createObject("Access.Application")
A2kApp.OpenCurrentDatabase
"c:\inetpub\wwwroot\myapplication\database\myaccessdb.mdb"
Set A2kCmd = A2kApp.DoCmd
A2kCmd.OpenReport "mylabels"
Set A2kapp = Nothing
Set A2kCmd = Nothing
....
3) Happy working )
Best regards
Peter Haider
"peterr" <peterr@forum.codecharge> schrieb im Newsbeitrag
news:640495290c8a45@news.codecharge.com...
> MS Access doesn't expose macros and modules for external access (from
VBScript). You would need to copy the code directly to ASP/VBScript files
and test and modify there as needed.
> _________________
> Peter R.
> YesSoftware Support Representative
> http://support.codecharge.com
> Warning: I use Google and CCS Docs/Examples in most of my answers
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
SteveS
Posts: 41
|
Posted: 03/08/2004, 12:09 PM |
|
Hey thanks! I'll check this out.
Regards,
Steve.
|
|
|
|