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

On Current Event

Status
Not open for further replies.

sjo

MIS
Jun 8, 2000
5
US
I am running some code in the on current event of a form which is based on a table.&nbsp;&nbsp;I need to count the number of records.&nbsp;&nbsp;I am using me.recordsetclone.recordcount&nbsp;&nbsp;<br>It first gives me only one record when I open the form- then after I move to the next record in the form it gives me four records(which is the correct number).<br><br>I have tried the same code in several events - load, activate, current, open.<br><br>I am basically trying to make record navigator buttons that look like the buttons that Access already has.&nbsp;&nbsp;So, when the user opens the form I want it to say record 1 of 4.<br><br>Any suggestions?<br>Thanks in advance!
 
You need more code<br><br>Any tiem you open a recordset you have to force the recordcount so use <br>Movelast then Movefirst<br>try this:<br>me.recordsetclone.Movelast<br>me.recordsetclone.Movefirst<br>me.recordsetclone.recordcount&nbsp;&nbsp;<br><br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Doug,<br>Worked like a charm!!<br>Thank you!<br><br>-sjo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top