• Autoexec problems (Access 2000)

    Author
    Topic
    #366527

    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

    Viewing 1 reply thread
    Author
    Replies
    • #568624

      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).

    • #568765

      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.

    Viewing 1 reply thread
    Reply To: Autoexec problems (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: