• Copy table structure only (Access 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Copy table structure only (Access 2000)

    Author
    Topic
    #442977

    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 ?

    Viewing 0 reply threads
    Author
    Replies
    • #1067588

      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.

    Viewing 0 reply threads
    Reply To: Reply #1067588 in Copy table structure only (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:




    Cancel