Adding new column to existing table 
Author Message
 Adding new column to existing table

Is it possible to add a new column to an existing table with code?  If
so, could someone post an example.  Thanks in advance.

Mark



Sun, 26 May 2002 03:00:00 GMT  
 Adding new column to existing table
Sub CreateFieldX()
Dim dbsNeptuno As Database
Dim tdfNuevo As TableDef
Dim fldBucle As Field
Dim prpBucle As Property

   Set dbsNeptuno = OpenDatabase("Neptuno.mdb")
   Set tdfNuevo = dbsNeptuno.CreateTableDef("NuevoTableDef")

  With tdfNuevo
      .Fields.Append .CreateField("CampoTexto", dbText)
      .Fields.Append .CreateField("CampoEntero", dbInteger)
      .Fields.Append .CreateField("CampoFecha", dbDate)
  End With
  dbsNeptuno.TableDefs.Append tdfNuevo
End Sub

MSDN  v6.0a
fjmendez

Mark Taylor escribi en mensaje

Quote:
>Is it possible to add a new column to an existing table with code?  If
>so, could someone post an example.  Thanks in advance.

>Mark



Sun, 26 May 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Adding new column to existing table

2. Adding new column to existing table

3. How to modified existing field and add new field in existing table for Access database

4. need help please:joined tables,add new entries based on one table columns

5. need help please:joined tables,add new entries based on one table columns

6. new columns in existing table

7. Add column to existing table

8. add a column to an existing data table

9. add column to an existing data table

10. Adox - Add Column to existing table (HELP!!)

11. Adding new fields to an existing table

12. Crystal, add new table to existing report?

 

 
Powered by phpBB® Forum Software