I am using MS Access 2016, I've got a table in my database that is linked to an external source through an ODBC connection. Data is come from MS excel. I created Query and linked up to macro. It runs correctly but it delete the previous table and remove primary key that i set. Here is my Sql Query:
SELECT AllStaff.NAMEID, AllStaff.USERNAME, AllStaff.DEPARTMEN,
AllStaff.Lastname, AllStaff.Firstname, AllStaff.RFCARDNUMB,
AllStaff.[PERSONAL R], AllStaff.VENDOR INTO AllStaff1
FROM AllStaff
WHERE (((AllStaff.NAMEID) Is Not Null));
So i want to set NAMEID as a primary key it will remain primary key after adding values. Thanks in advance