Automate compile and save...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matthew Wells

    Automate compile and save...

    Hello,

    I'm trying to automate changing a reference library from one mdb in
    another. I've found a syscmd call that says it does the trick - sometimes.
    My code in db1 is

    dim app as Access.Applicat ion
    set app = new Access.Applicat ion
    app.OpenCurrent Database"db2.md b")
    app.Run("CheckR eferences")

    The CheckReferences function works fine when I run it from within db2.mdb -
    and I know it fires when it runs from app because I put a msgbox in the
    function just to make sure. The odd thing is that I try to step through the
    code in app and into CheckReferences but it won't go "into" - only over - at
    least the first time. After the line is stepped over, I'll set the
    execution point back on the line and then it will step into CheckReferences
    and everything will work. Wierd. I tried running CheckReferences twice
    just to see what would happen, but that didn't work. I have other functions
    that fire during this process that run fine. I fired app.syscmd(504, 16483)
    after the call as well - no good.

    Any ideas?

    Thanks.

    --
    Matthew.Wells
    Matthew.Wells@F irstByte.net


Working...