[AccessD] AUTONUMBER

Joshua B jbusergroups at optushome.com.au
Sun Mar 2 16:59:00 CST 2003


Hello MastercafeCTV,

.Fields.Append .CreateField("MyAutoNumber", dbLong)
.Fields("MyAutoNumber").Attributes = dbAutoIncrField


======= At 2003-03-02, 23:52:00 you wrote: =======

>Excuse me... I explain very bad... sorry.
>
>This is the main code
>
>Dim ws As Workspace
>Dim db As Database
>Dim dbdest As Database
>Dim tdf As TableDef
>
>Set db = CurrentDb
>Set ws = DBEngine.Workspaces(0)
>Set dbdest = ws.CreateDatabase(cteTickets & "\actualiza.mdb", dbLangGeneral)
>Set tdf = dbdest.CreateTableDef("Base Clientes")
>With tdf
>    .Fields.Append .CreateField("Cliente", dbText, 15)
>    .Fields.Append .CreateField("ClteNombre", dbText, 50)
>    .Fields.Append .CreateField("ClteFnac", dbDate)
>    .Fields.Append .CreateField("acumcompra", dbSingle)
>    .Fields.Append .CreateField("transmit", dbBoolean)
>    .Fields.Append .CreateField("modif", dblong)
>End With
>dbdest.TableDefs.Append tdf
>
>The problem is how generate a CreateField Autonumber??
>
>Thanks
>
>Juan Menendez
>Mastercafe SL
>
>

			

Best regards.				 
Joshua B
jbusergroups at optushome.com.au
2003-03-03






More information about the AccessD mailing list