Generate Access Reports from VB Script 
Author Message
 Generate Access Reports from VB Script

I have an access database with 3 reports that need to be generated.

I can either activate each individual report, or I have a single code module
that would generate and save the reports.

This task is simple in VB:

Dim mdl as module
set mdl = modules("GenAllReports")
mdl.GenAllReports    'Actual name of code proc

Any idea how to do this in VB Script?  Here is what I have so far:

<html>

<head>
    <title>Report Generator Sample</title>
</head>

<head><script LANGUAGE="VBScript">
<!--
    Dim db, dbs, DB_Name, mdl

    DB_Name = "d:\4013382-241P02.mdb"
    set db = CreateObject("DAO.DBEngine.35")
    Set dbs = db.Workspaces(0).OpenDatabase(DB_Name)
    'dbs.openrecordset("Tolerances")

    dbs.close

 -->
    </script> </p>

</html>



Fri, 07 Jun 2002 03:00:00 GMT  
 Generate Access Reports from VB Script

I don't have a test MDB with modules to test this against but seems to me all you need to do is something like...

set Access = createobject("access.application")
Access.OpenCurrentDatabase "blah.mdb"
Access.Modules("ModuleX").SomeMethod <arguments>
set mod = Access.Modules("ModuleX")
mod.SomeMethod <arguments>
' or --> Access.Modules("ModuleX").SomeMethod <arguments>

--
Michael Harris


  I have an access database with 3 reports that need to be generated.

  I can either activate each individual report, or I have a single code module
  that would generate and save the reports.

  This task is simple in VB:

  Dim mdl as module
  set mdl = modules("GenAllReports")
  mdl.GenAllReports    'Actual name of code proc

  Any idea how to do this in VB Script?  Here is what I have so far:

  <html>

  <head>
      <title>Report Generator Sample</title>
  </head>

  <head><script LANGUAGE="VBScript">
  <!--
      Dim db, dbs, DB_Name, mdl

      DB_Name = "d:\4013382-241P02.mdb"
      set db = CreateObject("DAO.DBEngine.35")
      Set dbs = db.Workspaces(0).OpenDatabase(DB_Name)
      'dbs.openrecordset("Tolerances")

      dbs.close

   -->
      </script> </p>

  </html>



Fri, 07 Jun 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Generating Access reports from VB Script solution

2. Viewing Access reports with ASP/VB Script

3. Access Report generation from VB Script

4. generating reports with a VB CGI and Access

5. Generating reports form Access to Vb 3.0

6. Passing control from VB to VB Script -- need to access SetFocus in script

7. Tool to generate SQL scripts from access

8. Utility to generate SQL Script for ACCESS database

9. Generate access database using SQL Script

10. Utility to generate SQL Script for ACCESS database

11. VB Generated CGI Scripts

12. Accessing Data generated with client-side script from server-side script

 

 
Powered by phpBB® Forum Software