• Structure only (Access 2000)

    Author
    Topic
    #438789

    How shall i express by code the commands copy table paste structure only. I intend to use the following expression
    Dim SQL As String
    SQL = ” SELECT TblStudents.* INTO tblStudents FROM TblStudents
    CurrentDb.Execute SQL
    How can i set the requirement structure only ?

    Viewing 0 reply threads
    Author
    Replies
    • #1047085

      Instead of SQL, use DoCmd.TransferDatabase:

      DoCmd.TransferDatabase acImport, “Microsoft Access” , CurrentDb.Name, acTable, “tblStudents”, “tblStudentsCopy”, True

      The last argument True specifies that you want to transfer the structure only.

      • #1047088

        Thank you for that. I immeditely tried it with success !

    Viewing 0 reply threads
    Reply To: 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: