Results 1 to 4 of 4

Thread: Running an instance of Access97.......

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Location
    Manchester, England.
    Posts
    18
    Hi Guys

    I'm building a small app that will run various macros (for overnight reporting etc) from two or maybe three Access databases. I am then compacting each one ready for use next morning.

    All the code for compacting is sorted, but can anyone tell me how to go about running a macro that is held within a database? I presume i need to open an instance in some way and then locate the individual macro object..........

    Regards

    Peter Gidden

  2. #2

    Talking SQL

    Peter,

    Why not perform the actions from VB instead of using the macros.
    If your macros are running queries then use the SQL Code from the queries to run from VB.

    Bob


  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Location
    Manchester, England.
    Posts
    18
    I could do, but the macros already contain all the formatting and e-mail addresses.

    I was hoping there might be a way of running the macros from within VB. That would also leave the management and configuration of the macros within each database, and just the late night running to my VB program.

  4. #4
    Lively Member
    Join Date
    Oct 1999
    Posts
    90

    Lightbulb Access References

    Hey PetergUK,

    You can add a reference to Access in VB under the Project/References... menu. Just select the Microsoft Access 8.0 Object Library, and then you should be able to do most things you can do in Access straight from VB. You can use the DoCmd.RunMacro method to run a macro.

    I want to be able to print Access reports from within VB, and you can do that this way. However, nobody's been able to tell me you can do this on a machine that does not have Access (or Office at all) installed on it. Anyone? Will the install for the VB app put the necessary files onto a non-Access machine? Thanks.

    -JoeyCode

Posting Permissions

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



Click Here to Expand Forum to Full Width