So I have VB below which creates an access file in the default workspace, a table creates a field in the table Create ... just need to know the syntax for setting first data type / field Otoonmber ... GUID, counters, etc. access will not work as SQL
'error usually works as a databases of dormant workspace As dim ws dbExample tblMain dim as field as fldMain dim TableDef index set dim idxMain as ws here = Vertical (0) set dbExample = ws.CreateDatabase ( 'string file path ") (" ID "here I do not know what options to get autonumber type to dbInteger work) tblMain = dbExample.CreateTableDef (" tblMain ") set fldMain = tblMain.CreateField set tblMain.Fields.Append the fldMain etc. other areas and lists Create
so much in this line: set fldMain = tblMain.CreateField ("id", dbInteger) I need to replace dbInteger with something that echoes in the form of VB R Autonumber property I use GUID, Counter, Autonumber, AutoIncrement .... Unfortunately any of these works
Also have tried the syntax I am missing here?
Thanks, Justin
View access to the web.
To create a field with here are links to the major lines of the page:
db = Application.CurrentDb set TDF set = db.TableDefs (strTableName) 'first datatype = Long integer "set to FLD = tdf.CreateField (strFieldName, dbLong) fld with 'adding dbAutoIncrField properties' .Attributes = .Attributes or end .refresh with FLD dbAutoIncrField end with tdf.Fields .Append' plane that its An AutoNumber field tells'
btw, what are you doing ddl no
Comments
Post a Comment