How can I make a field autonumber type in VB?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to create a field with autonumber type when I'm using a SQL
string inside VB to do a make-table query? I'm not sure what the syntax
would have to be.

For instance, dates require ## and strings require ' ' but does the
autonumber type require a particular character?
 
As Far As I Know, there is no way to do this with a make table query.

You could build the table in advance and then populate it with an insert
query. YOu can run a delete query to empty the table before you populate
it.

Alternatives:
Use DDL language (SQL) to build the table
Design and store a Master copy of the table and then copy the table
(DoCmd.CopyObject) with new name and then populate the table with an insert
query.


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top