🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.databases.ms-access
Article #560

Re: Creating an autonumber field using VBA and DAO

#560
From: Douglas J. Steele
Date: Mon, 14 Aug 2000 00:00
52 lines
2366 bytes
I believe what the poster is looking for is how to create a table, using
VBA, so that it has an Autonumber field in it, not how to simulate one in
code.

The reference David posted, to Dev Ashish's "The Access Web", indeed shows
how to create such a table in code.

--

Doug Steele, Microsoft Access MVP
Beer, Wine and Database Programming. What could be better?
Visit "Doug Steele's Beer and Programming Emporium"
http://I.Am/DougSteele/


<randy_putnam@my-deja.com> wrote in message
news:8n98uv$6m0$1@nnrp1.deja.com...
> My last post referred to using Access to autonumber.
> I had a similar problem, I wanted a number field to increase by one.  I
> created a button that runs a macro.  The macro opens the table, moves
> to the last record (movelast) read the value, increment by one, move to
> the next (new) record (movenext) and insert the value into the field.
> It is slow for my system but it works.  The same type of logic should
> work in VBA.
>
> Anyone else got ideas?
>
>
> In article <3995ce32.0@news1.mweb.co.za>,
>   "David" <habanero.burns@mweb.co.za> wrote:
> > Hi
> >
> > I can create fields and tables programmatically using VBA.
> >
> > When I create the field, I can determine whether it is long, text,
> boolean
> > etc.
> >
> > However I have no idea how to make one of the fields that I add an
> > autonumber field
> >
> > Please help and thanks
> >
> > --
> > DME
> >
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Technical Details
Message-ID: <OpZ4B7hBAHA.248@cppssbbsa04>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3995ce32.0@news1.mweb.co.za> <8n98uv$6m0$1@nnrp1.deja.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10a93f,46b938df45b1c783
X-Google-Attributes: gid10a93f,public
X-Google-Thread: f8db2,46b938df45b1c783
X-Google-Attributes: gidf8db2,public
X-Google-Thread: ff0ac,46b938df45b1c783
X-Google-Attributes: gidff0ac,public
X-Google-Thread: 10f31b,46b938df45b1c783
X-Google-Attributes: gid10f31b,public
From: "Douglas J. Steele" <djsteele@idirect.com>
Subject: Re: Creating an autonumber field using VBA and DAO
Date: 2000/08/14
Message-ID: <OpZ4B7hBAHA.248@cppssbbsa04>
X-Deja-AN: 658228383
References: <3995ce32.0@news1.mweb.co.za> <8n98uv$6m0$1@nnrp1.deja.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-MSMail-Priority: Normal
Newsgroups: comp.databases.ms-access,free.database.access,it.comp.database.access,microsoft.public.access.3rdpartyusrgrp