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

Automatic Scrolling on Subform ?

Status
Not open for further replies.

danno28

Programmer
Sep 5, 2002
8
GB
Hi,
Hi
I have a form which displays one record at a time and included on this form is a continous subform which displays all the records from the same table. I've used conditional formatting to highlight the record on the subform that is displayed on the main form so when i move through the records on the main form the highlight changes accordingly. The problem I have is that i can only fit 5 records on the subform so ideally i would like the subform to automatically scroll so the current record is always displayed. i.e. when i move to record 6 on the main form, i'd like the subform to scroll down and displays records 2-6 if possible. is this possible ? i'm using access 2000.
thanks alot!
 
Hi,

In the main form event 'On Current' place the code to goto a certain record on the sub-form.

For the subform records, look at 'docmd' and 'gotorecord',
to set the current record in a form.

To refer to a 'control' in a subform (from the main form [On Current] event use this format:

Forms![Orders]![Orders Subform].Form.[control]......

Should be enough here for you to solve the prob.

Regards,

Darrylle

"Never argue with an idiot, he'll bring you down to his level - then beat you with experience." AND "A pointer to a solution is better than the solution - you'll remember the solution via a pointer". darrylles@totalise.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top