VB "Make Table"

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

Guest

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