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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sequential Numbering in Access Form

Status
Not open for further replies.

Tash

MIS
Nov 3, 2001
62
US
I need to number records sequentially on a form (similar to the RunningCount funtion on a Access Report). How can I go about doing this? The number should adjust each time a record is deleted or added. Thanks!
 
Evening, Tash!

This bit of code does what you want and places the record count and the total number of records in the caption at the top of the form. You could use this example to place it elsewhere, of course.

Private Sub Form_Current()

Me.Caption = "Record " & CurrentRecord & " Of " & RecordsetClone.RecordCount & " Records"

End Sub

Hope this helps.

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
Hello Missinglinq

Thanks for your reply, I actually need to have the sequential numbering next to each record on the form. For example:

1 Red
2 Blue
3 Green
4 Orange
5 Yellow

If I were to delete (3 Green), then it would re-number to

1 Red
2 Blue
3 Orange
4 Yellow

The numbers do not have to be connected to the color descriptions, just a way of numbering the records on a form.

Thanks,
Tash
 
Thanks ZmrAbdulla -

This is exactly what I was looking for! I am having a little trouble getting it to work on my database, but I think I just have to troublshoot my side a little bit more.

Thanks again!
 
if you cannot get this to work it is possibly because you did not import the module from the sample DB. Make sure you import the module (you can cut and paste)
 
Also see thread702-1107818

________________________________________________________________________
Zameer Abdulla
Visit Me
Children are poor men's riches.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top