(I may be wrong but) I think when Pierre wrote VB, he actually meant VBA for
Access95 (hence DAO).
To add an AutoNumber Field into an existing Table (in A97, not sure about
A95), I normally use the Jet-SQL statement "ALTER TABLE" and the Reserved
Word "Counter" (or "AutoIncrement") to specify an AutoNumber Field.
Check Your A95 Help on the above Keywords see if it is applicable to A95.
HTH
Van T. Dinh
Quote:
> You don't say whether you are using DAO or ADOX in your VB program, so
it's
> difficult to answer. One thing that I can tell you right off the bat is
> that the autonumber fields have a field type of long interger. There is a
> separate property that you have to use to make your long integer field an
> autonumber one.
> > Greetings All:
> > Using Access for Windows 95, my goal is to use Visual Basic to add an
> > autonumber field to a table.
> > Access "auto-numbering" documentation details adding the field using the
> > table design window. The "TypeProperty" topic does not discuss
> > auto-numbering fields. Are there no constants similar to "dbText" for
> > creating auto-numbering fields?
> > God Bless,
> > Pierre