Can anyone tell me how to set up an autonumber on a form (I'll hide it)
please? I would also like to know how to make this my primary key. Any
suggestions?
Larry Daugherty - 08 Apr 2005 12:18 GMT
Hi Kate,
You don't set it up on your form. You would usually make the first
field in your table, say tblPerson, PersonID and give it a type of
Autonumber and click the key icon to make it the primary key.. If you
then include field PersonID in your query for the form, PersonID will
be available on the form.
You're wise to hide it. That way, people won't wonder what it's all
about nor try to constrain its behavior.
HTH

Signature
-Larry-
--
> Can anyone tell me how to set up an autonumber on a form (I'll hide it)
> please? I would also like to know how to make this my primary key. Any
> suggestions?
Jeff Boyce - 08 Apr 2005 12:27 GMT
In Access, tables store data, forms display it.
Start at the beginning. Autonumbers are data. Data lives in tables. You
need an autonumber type field in a table first. In the table definition,
make it the autonumber.
Then, use either a query or refer directly to the table to place controls on
a form.

Signature
Good luck
Jeff Boyce
<Access MVP>
> Can anyone tell me how to set up an autonumber on a form (I'll hide it)
> please? I would also like to know how to make this my primary key. Any
> suggestions?