Dsiplay a number on each record on a form in detail section

  • Thread starter Thread starter Bob Betts
  • Start date Start date
B

Bob Betts

Hi!

Would like to put an unbound box in the detail section of the form wherein
this would serve as record number. I can do this in the report by putting an
unbound box putting a value of =1 and adjusting running sum property to yes
.... how do i do this in a form?

Thanks.
 
Hi!

Would like to put an unbound box in the detail section of the form wherein
this would serve as record number. I can do this in the report by putting an
unbound box putting a value of =1 and adjusting running sum property to yes
... how do i do this in a form?

Thanks.

If I remember correctly, Stephen Lebans has a download that does this.
See:
http://www.lebans.com
 
See:
http://www.lebans.com/rownumber.htm
Rownumber.zip is a database containing functions for the automatic row
numbering of Forms, SubForms and Queries.

Updated Oct. 13 by Allen Browne. Includes error handling and cleaned code.



Here's an update to the Serialize function by Peter Schroeder:

Good to hear. FWIW, here's the version I came up with today, based off of
your code and Ken's(Getz) suggestion, with a few changes:


Function Serialize(qryname As String, keyname As String, keyvalue) As Long

Dim rs As Recordset


On Error GoTo Err_Serialize

Set rs = CurrentDb.OpenRecordset(qryname, dbOpenDynaset, dbReadOnly)

rs.FindFirst Application.BuildCriteria(keyname, rs.Fields(keyname).Type,
keyvalue)

Serialize = Nz(rs.AbsolutePosition, -1) + 1


Err_Serialize:

rs.Close

Set rs = Nothing

End Function


Peter Schroeder


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top