How can I make a field autonumber type in VB?

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?
 
J

John Spencer

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
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top