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

What record is active in an Access form? 1

Status
Not open for further replies.

cthaxter

Programmer
Aug 2, 2001
71
US
How can I return the record number that I'm in if I'm in a simple Access form?

I want to use the docmd.gotorecord statement to navigate throughout a form, but first I need to know on the fly what record I'm in.

In other words, if I'm in record number 6 and I run the code, I want to be able to show a message box that tells me "You are currently in record 6." Of course, that's not how I will use the code, but that's my exact puzzle right now.

Any help?

-Christopher
 
In Access 2000 and access 97 the Form's CurrentRecord property gives you the number of the current record.

In the form's OnCurrent event:

txtCurrentRecord = Me.CurrentRecord

M.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top