Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Autoexec problems (Access 2000)

    I have a database with an autoexec macro opening a form called Frm1. In the OnOpen event of the form i have another function which simplified, transfers the data to a given database , say
    DoCmd.TransferDatabase acExport, "Microsoft Access", "C:beBerlin.mdb", acModule, "MdlDepot", "MdlDepot"

    ALl i want is that on opening the database, to export the module "MdlDepot" to a given database,called Berling.mdb.But i cannot do it. It is the autoexec macro the creates my problems. Otherwise, on opening the form itself the command is executed and the module is transferred. So the problems lies with the macro autoexec. But i want to transfer the data not by opening the form,.but by an autoexec macro. Actually this is the sole purpose of my database, and i am sending it through Internet to my other end users.I didnt know that the autoexec macro will create such troubles for me. I have tried at first to put the TransferDatabase code in the autoexec code itself, but again id didnt work.
    Did anybody come across a similar situation?
    Can somebody help me? I will be extremely grateful

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    San Francisco, California, USA
    Posts
    358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autoexec problems (Access 2000)

    I was just reading about autoexec, and it seems to take place at a different time than anything that's set to startup....

    Have you tried starting the form on startup (Tools-->Startup and then identify your form as the startup form) instead? I don't know that it'll make much of a difference, but you never know.

    I always did have problems with TransferDatabase, I ended up with all sorts of error handling that if it wasn't copied properly, do it again & again until it came out right. Usually took two or three rounds for the objects to copy properly (in 97).

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Autoexec problems (Access 2000)

    I can't say I've ever tried to run a macro like that from autoexec. In a similar situation, I have a simple form that is loaded via the Database Startup option, and contains OK and Cancel command buttons. Clicking OK then does the transferDatabase. I guess I feel more comfortable doing it this way.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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