General discussion

Locked

Access 2000 continuous form scroll

By rnbmeares ·
In access 2000 I've created a continuous form where 3 detail records show in one form view. I would like to create a command button that would not only move to the next record but to move 3 records at a time putting the "moved to" record to the top of the form.
I've currently created a command button using the following VB: "DoCmd.GoToRecord , , acNext, 3"
My Problem is: Though this command moves 3 records at a time it does not put the "moved to" record to the top of the form so that the user can view the next 3 records. Is there a way for me to accomplish this?

Thank you for you help and the time you take to help people like me out.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Access 2000 continuous form scroll

by Haris In reply to Access 2000 continuous fo ...

MS Access provides the CurrentRecord property to find the current record. Every bound from provides this property and once you have moved to the third record you can use it to update the data on the form. After DoDmd.GoToRecord,,acNext,3
your first detail record would be:
frm!txtYourDataRec1=frm.CurrentRecord
The next detail record can be
frm!txtYourDataRec2=frmCurrentRecord+1

Access also has the property with which you can REFRESH the form to update all the controls.

When moving ahead with the records, you would also need to apply a check that the next record is available and you might have to stop finally displaying 3 or less records.
You can determine the total number of rows from the recordset that is filling the form.The RecordCount property ostensibly returns the number of rows that have as of yet loaded. Commom knowledge says you must use the MoveLast method to move to the end of the recordset before you can know th number of rows in the recordset. Experience shows that this isn't really necessary for some type of recordsets. You can use the following code to get the total numbe of records. use it in the form's current event.
set rst=frm.RecordSetClone
frm!txtTotalRecs=rst.RecordCount

Collapse -

Access 2000 continuous form scroll

by rnbmeares In reply to Access 2000 continuous fo ...

Thanks for your time and effort. It helped me get to where I needed to go.

Collapse -

Access 2000 continuous form scroll

by rnbmeares In reply to Access 2000 continuous fo ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums