We Recommend

Visual Basic 2008 Programmer's Reference Visual Basic 2008 Programmer's Reference
Visual Basic Orcas Programmer's Reference is a language tutorial and a reference guide to the upcoming Orcas release of Visual Basic. The tutorial provides basic material suitable for beginners but also includes in-depth content for more advanced developers.


Posted By

qrist0ph on 06/13/08


Tagged

access vba DDL


Versions (?)


Access Autowert-Feld per VBA-Code erstellen


Published in: Visual Basic 


  1. Sub createAutoIncrField()
  2.  
  3. Dim Fld As DAO.Field
  4.  
  5. Set Fld = CurrentDb.TableDefs("deineTabelle"). _
  6. CreateField("deinFeldname", dbLong)
  7. Fld.Attributes = dbAutoIncrField
  8. CurrentDb.TableDefs("deineTabelle").Fields.Append Fld
  9.  
  10. End Sub

Report this snippet 

You need to login to post a comment.