Autonumber on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
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.
 
Back
Top