Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Sep 2006
    Posts
    166
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Copy table structure only (Access 2000)

    I need to use in a function copying a new table structure only, exactly as when i do it manually with copy,paste,and select structure only.Can i do it by code ?

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

    Re: Copy table structure only (Access 2000)

    You can use DoCmd.TransferDatabase to "import" the table into the current database; TransferDatabase has a StructureOnly argument:

    DoCmd.TransferDatabase acImport, "Microsoft Access", CurrentDb.Name, acTable, "tblStudents", "tblNewStudents", True

    will copy the structure of the table tblStudents to a new table tblNewStudents.

  3. #3
    2 Star Lounger
    Join Date
    Sep 2006
    Posts
    166
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy table structure only (Access 2000)

    Thank you so much

Posting Permissions

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