Establishing Record Number

aziz rasul

Active member
Local time
Today, 21:21
Joined
Jun 26, 2000
Messages
1,935
On a form, I have removed the record navigation buttons (for reasons too long to explain) and have created command buttons on the form to navigate from record to record.

However I still need to know which record I'm currently on by placing a text box on the form. Any ideas what the code would be, in say the Control Source property of the text box?
 
I would suggest to use the field name which has the Autonumber data type.
If not available, use the field that has the primairy key, assuming that that is a number field.

Hth
 
There is no autonumber field. The primary key is not a number.
 
I believe you would need an unbound control (e.g. textbox with no control source). You would probably also set its Locked property to true (so users can't edit it).

I expect searching access on-line help for "CurrentRecord Property" may set you on the desired path. :)

HTH

Regards

John.
 
or you could switch the navigation buttons back on in the forms properties.

Col
 
P.S.
I forgot to mention before....

you will want to update your control's value in the form's On Current event.
 
Just placing =[CurrentRecord] in an unbound text box seems to have worked. Locking the text bound or not makes no difference as it is set to =[CurrentRecord].
 
john471 said:
I believe you would need an unbound control (e.g. textbox with no control source). You would probably also set its Locked property to true (so users can't edit it).

Good pointer John. I would have never thought of that, but indeed =[CurrentRecord] works great.

Cheers, Ron
 

Users who are viewing this thread

Back
Top Bottom