VB "Make Table"

J

James C.

Does anyone know how to do a make table using vb? I am running SQL in one of
my functions and need to create a table.
 
J

Joerg Ackermann

James said:
Does anyone know how to do a make table using vb? I am running SQL in
one of my functions and need to create a table.

use (DDL) SQL -> currentdb.execute "CREATE TABLE...
or
use VBA -> CreateTabledef-Method

There are several examples in access-help

Acki
 
C

Carol Grismore

dim mySQL as string
mySQL = "create table Fred (txtText char(50), datDate datetime, intInt int)"
docmd.runsql mySQL

If you want to make a table from existing data, replace the mySQL text with
text stolen from a make table query.
 
Top