Simply use DAO's ability to programmatically create tables dynamically.
Dim dB as Database
Dim tableName as TableDef
Dim field1 as Field
Set dB = CurrentDb()
Set tableName = dB.CreateTableDef()
tableName.Name = "name"
' create a text type field with a length of 15
Set field1 = name.CreateField("field_name", dbtxt, 15)
' Append the field to the table first
name.Fields.Append field1
' then append the table to the tables collection
' otherwise, your table will not be stored permanently
With dB.TableDefs
.Append name
' refresh in case of multi-user environment
.Refresh
' update entire db window for immediately reflecting changes
.RefreshDatabaseWindow
End With
Narayanan Srinivasan
coolie91@hotmail.com
Brothers and Sisters from India, if you have any recent news regarding F-1 to H-1B visa transfer, please e-mail me. Thanks.