By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,118 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Display Record number is a Control

P: n/a
I have a form where records are entered. I have turned off the built in
record control. I created buttons to advance and go back through the
records as well as an add new record button, but I also want to display
the current record number.

I have a blank control on the form to display the number but I can not
figure out how to assign it to that blank control?

Anyone know how to do this?

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In your Form's current event you can write this code:

Private Sub Form_Current()
Text2 = Me.CurrentRecord
End Sub

This will give you the current record number of the record you are
currently on. Or, you could also put this code in your button for
moving through records. The catch is that Me.CurrentRecord only works
on the recordset (table or query) that the form is based on.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #2

P: n/a
Michael Charney <mb*******@sbcglobal.net> wrote in
news:3f***********************@news.frii.net:
I have a form where records are entered. I have turned off the
built in record control. I created buttons to advance and go
back through the records as well as an add new record button,
but I also want to display the current record number.

I have a blank control on the form to display the number but I
can not figure out how to assign it to that blank control?

Anyone know how to do this?


In the On Current event of your form
Me.RecordsetClone.Bookmark = Me.Bookmark
Me.Text99 = Me.RecordsetClone.AbsolutePosition + 1

change Text99 to the name of your control

Bob Q.

Nov 12 '05 #3

P: n/a
Create a text box on your form. Then place the field name from the
table that contains the record number into the control source.

John

Michael Charney <mb*******@sbcglobal.net> wrote in message news:<3f***********************@news.frii.net>...
I have a form where records are entered. I have turned off the built in
record control. I created buttons to advance and go back through the
records as well as an add new record button, but I also want to display
the current record number.

I have a blank control on the form to display the number but I can not
figure out how to assign it to that blank control?

Anyone know how to do this?

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.