Feb 15, 2006 #1 jwruble Programmer May 29, 2002 16 US Is it possible to create a make-table query with one of it's columns being generated as a unique id for each row? Thanks for any help.
Is it possible to create a make-table query with one of it's columns being generated as a unique id for each row? Thanks for any help.
Feb 15, 2006 #2 PHV MIS Nov 8, 2002 53,708 FR In VBA: DoCmd.RunSQL "MakeTableQuery" DoCmd.RunSQL "ALTER TABLE myTable ADD COLUMN myID COUNTER(1,1) CONSTRAINT PrimaryKey PRIMARY KEY;" Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
In VBA: DoCmd.RunSQL "MakeTableQuery" DoCmd.RunSQL "ALTER TABLE myTable ADD COLUMN myID COUNTER(1,1) CONSTRAINT PrimaryKey PRIMARY KEY;" Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886