Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Copy table (Access 2000)

    I want to copy a table orders1 and name it orders2 which is in the part of a longer function.The copying takes place in the onOpen event of the form.I come across the following problem.When i open the database with the password, which in my case is "secret", no copying of the table occurs, i cannot obtain table orders2.However, if i open a blank database and then import the table and the form, then the copying takes place.Can you help me with this problem? Is there any other way besides transfer database, and how can i avoid this problem? I am applying the 2 databases, with the second database without the password i can make the copy by opening the form, but not with the first database.
    Attached Files Attached Files

  2. #2
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy table (Access 2000)

    and here is the second database
    Attached Files Attached Files

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy table (Access 2000)

    You can use :
    DoCmd.CopyObject CurrentDb.Name, "orders2", acTable, "orders1"
    Francois

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Copy table (Access 2000)

    It works OK for me in the first database too, but as an alternative you could use the CopyObject method:

    DoCmd.CopyObject , "orders2", acTable, "orders1"

  5. #5
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy table (Access 2000)

    Thank you ! You helped me out of my problem !

Posting Permissions

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