Need to Open Database from another Database and delete table within

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • I Are Confused

    Need to Open Database from another Database and delete table within

    I am trying to open Database #2 while in Database #1 and delete a
    table that is in #2 so that I can copy a table from #1 into #2 - all
    through a function. My Database #2, as part of the start up, opens a
    form for user sign in. It is not starting up with autoexec. I do not
    want the function to open the window and subsequently open the form in
    Database #2. Is there anyway to get around this? If I put the open
    form in the autoexec and not in the start up, can I work around it?
    And if so, can anyone offer any help or suggestions on the how to's.
    I have spent the day trying to find a way around it and have gotten
    nowhere, but confused.

    Thanks in advance for any help!
  • Bruce M. Thompson

    #2
    Re: Need to Open Database from another Database and delete table within

    > I am trying to open Database #2 while in Database #1 and delete a[color=blue]
    > table that is in #2 so that I can copy a table from #1 into #2 - all
    > through a function. My Database #2, as part of the start up, opens a
    > form for user sign in. It is not starting up with autoexec. I do not
    > want the function to open the window and subsequently open the form in
    > Database #2. Is there anyway to get around this? If I put the open
    > form in the autoexec and not in the start up, can I work around it?
    > And if so, can anyone offer any help or suggestions on the how to's.
    > I have spent the day trying to find a way around it and have gotten
    > nowhere, but confused.[/color]

    Have you considered simply exporting the table from the current db (#1) into db
    #2? Look up the "TransferDataba se Method" in Access Help. Using this method will
    replace any existing object of the same type and name, so you don't need to
    delete the table in the destination database first.

    --
    Bruce M. Thompson, Microsoft Access MVP
    bthmpson@mvps.o rg (See the Access FAQ at http://www.mvps.org/access)[color=blue][color=green]
    >> NO Email Please. Keep all communications[/color][/color]
    within the newsgroups so that all might benefit.<<


    Comment

    • I Are Confused

      #3
      Re: Need to Open Database from another Database and delete table within

      "Bruce M. Thompson" <bthmpson@big_N OSPAM_foot.com> wrote in message news:<vq3670708 6ag67@corp.supe rnews.com>...[color=blue][color=green]
      > > I am trying to open Database #2 while in Database #1 and delete a
      > > table that is in #2 so that I can copy a table from #1 into #2 - all
      > > through a function. My Database #2, as part of the start up, opens a
      > > form for user sign in. It is not starting up with autoexec. I do not
      > > want the function to open the window and subsequently open the form in
      > > Database #2. Is there anyway to get around this? If I put the open
      > > form in the autoexec and not in the start up, can I work around it?
      > > And if so, can anyone offer any help or suggestions on the how to's.
      > > I have spent the day trying to find a way around it and have gotten
      > > nowhere, but confused.[/color]
      >
      > Have you considered simply exporting the table from the current db (#1) into db
      > #2? Look up the "TransferDataba se Method" in Access Help. Using this method will
      > replace any existing object of the same type and name, so you don't need to
      > delete the table in the destination database first.[/color]

      THANKS!!!!!!! I had not even thought of it. I was working on code to
      use OpenDatabase and delete the table then copy over the new one. This
      works great, with no troubles. The Export to overwrites the table in
      the database #2 with what is in Database #1. Thanks so much for your
      suggestion and help!!!!
      Cyndy

      Comment

      • Bruce M. Thompson

        #4
        Re: Need to Open Database from another Database and delete table within

        > THANKS!!!!!!! I had not even thought of it. I was working on code to[color=blue]
        > use OpenDatabase and delete the table then copy over the new one. This
        > works great, with no troubles. The Export to overwrites the table in
        > the database #2 with what is in Database #1. Thanks so much for your
        > suggestion and help!!!!
        > Cyndy[/color]

        You're welcome! :-)

        --
        Bruce M. Thompson, Microsoft Access MVP
        bthmpson@mvps.o rg (See the Access FAQ at http://www.mvps.org/access)[color=blue][color=green]
        >> NO Email Please. Keep all communications[/color][/color]
        within the newsgroups so that all might benefit.<<


        Comment

        Working...