Link to home
Start Free TrialLog in
Avatar of PeterJayNelson
PeterJayNelson

asked on

Calling form detail "scooting" after refresh (.ADP)

This is an Access 2000 ADP with SQL Server 2000.

I have a calling form in COntinuous mode.  Multiple rows display after filling the RecordSource property with a SQL string using a one to one relationship between table A and table B.  Upon double clicking a row we open a second form in single mode using a SQL String just using Table B fields.  After closing the second form we return to the Calling form.  Since the calling form has fields from Table A and Table B we need to "update" the data in those controls so it reflects the change just carried out.  To do that, we do a Me.Refresh.  The controls update as expected, but the row that had the focus (from the initial double-click) is now the first row displayed at the top of the form.  So the rows have scrolled up, if you will, apparently as a result of the refresh.

So, is there a way to "update" the controls without causing this scrolling?
Avatar of fritz_the_blank
fritz_the_blank
Flag of United States of America image

I am not sure how to do this exactly, but you might want to store the record ID to a variable, and then once the refresh is complete, to set focus back on the record in question.

Fritz the Blank
Avatar of PeterJayNelson
PeterJayNelson

ASKER

The record still maintains the focus, it is still selected, but its on-screen position "shifts" up.  If you can envision the form displaying 20 rows and you double-click on row 10 - in the middle of the screen.  You go to the secondary form, do your thing, close the form, and return to the form with the 20 rows.  Row #10 that we double-clicked on is now the "first" row at the top of the form and it is still selected.  So I can see rows 10 through 20 because rows 1-9 scrolled up, and off, the form.
I am sorry, I assumed that resetting focus on the control would make it visible. There has to be some property that indicates what portion of the records appear in the viewable part of the window. If I find it, I will let you know.

Fritz the Blank

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in Community Support that this question is:
 - PAQ'd and pts refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
ASKER CERTIFIED SOLUTION
Avatar of Netminder
Netminder

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial