[AccessD] A2K:Create Fields via code - Solved

Darren DICK d.dick at uws.edu.au
Wed Apr 7 22:14:29 CDT 2004


Hi Dave
That was it
It seems you can't create an autonumber from code
You first create a  number field then change the attributes
of that newly created field to  (drum roll)  ***dbAutoIncrField***
Then that tells access it's an Autonumber

No wonder the help wasn't
I wouldn't have discovered/figured this by myself in a million years.
Many many thanks

and many thanks to those who responded

(I was just going through variations on Susan's suggestion when your post came in)

This list is brilliant

Darren


----- Original Message ----- 
From: "Dave Sharpe" <DaveSharpe2 at cox.net>
To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com>
Sent: Thursday, April 08, 2004 12:47 PM
Subject: Re: [AccessD] A2K:Create Fields via code


> Darren
> 
> I think that this should help
> 
> http://www.mvps.org/access/tables/tbl0016.htm
> 
> Dave
> 
> ----- Original Message ----- 
> From: "Darren DICK" <d.dick at uws.edu.au>
> To: "AccessD List" <AccessD at databaseadvisors.com>
> Sent: Wednesday, April 07, 2004 9:41 PM
> Subject: [AccessD] A2K:Create Fields via code
> 
> 
> > Hello all
> > I managed to find in the help code for creating fields in tables.
> Excellent
> > I can see examples and general info on creating just about every field
> known to mankind....except Autonumber.
> >
> > I am importing a DBF file with no Autonumber
> >
> > The field I was going to use a PK in that file is TEXT.
> >
> > So..I'm open to suggestions- convert the text field to a number field or
> try and add an Auutonumber field and use that
> >
> > Any suggestions welcome
> >
> > many thanks
> >
> > Darren
> >
> > -- 
> > _______________________________________________
> > 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



More information about the AccessD mailing list