For the database:
For the table:Code:Private Sub NewDatabase_Click() Dim db As Database CommonDialog1.ShowSave If CommonDialog1.FileName <> "" Then Set db = DBEngine.Workspaces(0).CreateDatabase (CommonDialog1.FileName, dbLangGeneral) End If End Sub
[Edited by Dr_Evil on 04-03-2000 at 10:26 AM]Code:Sub CreateTable() Dim td As TableDef Dim fields(2) As Field Set td = db.CreateTableDef(name,attributes,source,connect) Set fields(0) = td.CreateField(name, type, size) Set fields(1) = td.CreateField(name, type, size) td.fields.Append fields(0) td.fields.Append fields(1) End Sub




Reply With Quote