make key field

E

Ed Finley

Once I've done a make table query, how do I specify a field to be the key
field with no duplicates allowed?
Thanks,
Ed
 
M

[MVP] S.Clark

Open the table in design view, and set the properties for the field(s). If
you do this often, you may want to consider having a more permanant table
that has these established already. Then, instead of a Make Table, do a
delete and an append query instead.


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
E

Ed Finley

Thanks for the response. My question is how to do this in VB. I want to
set up a button that makes the table, creates the primary key, then appends
from another table that will have duplicates.
Thanks,
Ed
 
M

[MVP] S.Clark

Again, if you don't have to(i.e. They fields, keys, etc are all identical
for each run) then recreate the table every time, reuse an existing one.
Use a delete/append instead of the Make Table.

If not, check out the DDL help, or create the index via DAO or ADO.
 
Top