Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    May 2001
    Omaha, NE USA, Nebraska, USA
    Thanked 0 Times in 0 Posts

    run macro from other db pt2

    Thanks to MarkJ (3StarLounger) for showing me how to run a macro from a separate db.

    I have another question.

    In db1, I have a table named tblDates that stores a beginning and ending date for use in running queries/reports. In db2, I have a table named tblReportDates that does basically the same thing.

    At month end, I run lots of different reports that I have set up to run from an access macro in db1. Some of the reports reside in db2. I would like to know if there is a way to specify that the field dtmStartDate in tblReportDates (from db2) is set equal to dtmStartDate in tblDates (from db1) before it prints the report.

    Here is the code that I am using to print the report from db2.

    Sub SWDEOMBreak()
    Dim AccessApp As New Access.Application
    Dim strDB As String
    strDB = "Srvnt01SharedPRODUCTIONMISEOM Volume Report.mdb"
    AccessApp.OpenCurrentDatabase strDB
    AccessApp.DoCmd.OpenReport "Embossed Card Breakdown", acViewNormal
    Set AccessApp = Nothing

    End Sub

    Any help is appreciated. Steve69 <img src=/S/crazy.gif border=0 alt=crazy width=15 height=15>

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

    Re: run macro from other db pt2

    Is there some reason you have to maintain two databases to do essentially the same thing? If you have to keep separate databases, why not put the dates table in a separate back end and link both databases to it instead of trying to sync two different tables?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts