Mark L. Breen
subs at solution-providers.ie
Mon Mar 3 08:21:00 CST 2003
Hello Juan, The autonumber is actually a normal long field with an attribute set the way that you do it is fld.Attributes = dbAutoIncrField You can rework you code below to handle that and it will work perfectly. Hope that helps, Best Regards Mark L. Breen Solution Providers Ltd Ireland ----- Original Message ----- From: "MastercafeCTV" <mastercafe at ctv.es> To: <accessd at databaseadvisors.com> Sent: Sunday, March 02, 2003 10:52 PM Subject: RE: [AccessD] AUTONUMBER > 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 > > > -----Mensaje original----- > De: accessd-admin at databaseadvisors.com > [mailto:accessd-admin at databaseadvisors.com]En nombre de Rocky Smolin - > Beach Access Software > Enviado el: domingo, 02 de marzo de 2003 22:27 > Para: accessd at databaseadvisors.com > Asunto: Re: [AccessD] AUTONUMBER > > > In the design view of the table the combo box under the data type for the > field has Autonumber as an option. > > Rocky Smolin > Beach Access Software > > ----- Original Message ----- > From: "MastercafeCTV" <mastercafe at ctv.es> > To: <accessd at databaseadvisors.com> > Sent: Sunday, March 02, 2003 1:10 PM > Subject: [AccessD] AUTONUMBER > > > > Hi all... I have a problem creating a new data structure. > > > > How to create an Autonumber field?? > > We check the help of Access and there isn't any help of this. In the > > begining we use a Long digit, but this isn't enough. > > > > Some ideas?? > > > > Thanks > > > > Juan Menendez > > Mastercafe SL > > www.mastercafe.com > > > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >