Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic counting field in a table

Status
Not open for further replies.

118600

Vendor
Feb 15, 2005
36
0
0
DE
Hi,

Can i add a field( a column ) in a table, in which i can count or add automatically the entries ? like
1
2
3
4
.
.
.

should i use count() function here, or any other fuction ?

Thanks,
 
Have you tried to set the fields to an autonumber. this will automatically count up the number of rows?

David Lerwill
"If at first you don't succeed go to the pub"
 


Thanks dwlerwill,

can you please try to explain me how to set it automatically to get a number added each time ?

 
No Probs mate

Go to design mode on your table

Add a field called whatever you need (Count for example)

Under Datatype select autonumber

and save the table and your done.

Hope this helps

David Lerwill
"If at first you don't succeed go to the pub"
 

Thanks for your help David,

it will work

but i have created a new table-2 from an existing table-1 by using make-table query. Here i want to add a field( by using count() etc ) which will create autonumber whenever new field is added in first table-1.

any idea ?

 
First, if this number has any meaning at all, you shouldn't use an autonumber.

Second, realize that by using an autonumber you will NOT end up with a sequential number, there will be missing numbers.

You should browse the FAQs of the Access Forums:

Forum700
Forum701
Forum181

for information on creating your own "autonumber"

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top