Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exporting Mulitple Objects (Access 97)

    I periodically need to create new objects for an existing database. I then need to send these new objects in a file to the client. I am looking for a method whereby they can open an mdb file and then upon opening the file, the objects would automatically be transferred to the existing db. The new objects would overwrite the old objects.

    I have tried using the following code. It is activated when using the autoexec macro. I receive a run-time error #3420 "Object Invalid or No Longer Set".

    DoCmd.TransferDatabase acExport, "Microsoft Access", "c:datahobbynhobbyfe.mdb", acForm, "frmChooseCoins", "frmChooseCoins", False
    DoCmd.TransferDatabase acExport, "Microsoft Access", "c:datahobbynhobbyfe.mdb", acForm, "frmInvoice", "frmInvoice", False
    DoCmd.TransferDatabase acExport, "Microsoft Access", "c:datahobbynhobbyfe.mdb", acForm, "MainMenu", "MainMenu", False

    Thank you for any help.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Exporting Mulitple Objects (Access 97)

    There isn't anything wrong with the syntax, and an equivalent statement works perfectly well on my PC, so there must be another reason for its failure. Are you sure the path is correct on the target machine? Is the target database secured using Access security? Is the file you're exporting from on their local drive? If not, try copying the file to the local hard drive first and then opening it and see if that takes care of the problem. I've seen similar errors when trying to do something from a diskette or a network drive and cured it by copying the file to the local hard drive first.
    Charlotte

Posting Permissions

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