RE:consulta creacion tabla por codigo
No me ha dejado mandarlo junto
Te doy dos metodos para crear la base de datos. Solo tienes que decir que mdb quieres y poner la funcion a algun boton. Puedes hacerlo por dao o por ado (para access2000)
ADOX
Sub ADOCreateTable()
Dim cat As New ADOX.Catalog
Dim tbl As New ADOX.Table
\' Open the catalog
cat.ActiveConnection = \"Provider=Microsoft.Jet.OLEDB.4.0;\" & _
\"Data Source=C:\\nwind.mdb;\"
\' Create a new Table object.
With tbl
.Name = \"Contacts\"
\' Create fields and append them to the new Table
\' object. This must be done before appending the
\' Table object to the Tables collection of the
\' Catalog.
.Columns.Append \"ContactName\", adVarWChar
.Columns.Append \"ContactTitle\", adVarWChar
.Columns.Append \"Phone\", adVarWChar
.Columns.Append \"Notes\", adLongVarWChar
.Columns(\"Notes\").Attributes = adColNullable
End With
\' Add the new table to the database.
cat.Tables.Append tbl
Set cat = Nothing
End Sub