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

How to bring a selected record to the top of a subform datasheet

Status
Not open for further replies.

herbivorous

Technical User
Mar 28, 2002
32
US
I am using a findfirst to set the pointer on a subform in datasheet view (see my last thread if that needs more explanation). But the downward search always leaves the selected record at the bottom of the datasheet, whereas the top would be far more useful. I tried using

[myform].seltop=[myform].currentrecord

But this isn't doing anything, I gather because seltop doesn't concern itself with the visible datasheet, only with what is selected on it -- in this case, the current record, so I gather that the vba is shrugging inside and saying "whatever, guy."

Any thoughts on how to scroll my selected record to the top of my list?
 
There is no way in Access I am aware of to move a selected record in a datasheet to the top of a subform. If course there is are generally ways to juryrig something. You could use a sort_id column and place a value greater than any current value then sort descending by sort_id and requery.



-------------------------------------
scking@arinc.com
Try to resolve problems independently
Then seek help among peers or experts
But TEST recommended solutions
-------------------------------------
 
Darn that Access -- seems like it ought to be the easiest thing in the world, doesn't it?

My current work-around is to do a find last, then a find first. It doesn't so directly address the problem as I posed it, but the purpose of the datasheet is allow one to search a list of names to find the appropriate record, so this method insures that as many possible matches as possible appear on the screen at once. The only gripe I have now is that it is kind of jerky -- you see the scroll down and back up taking place. I guess now I explore how to address that. . .
 
ALL Applications have limitations. Our challenge is to know how to design it. If you turned your datasheet into a single form the form would be displayed with the correct data. Sometimes we conceive and idea and have trouble determining how to do it within the capabilities of the application.

If there were a perfect application then there would be no need for others, or developers.
-------------------------------------
scking@arinc.com
Try to resolve problems independently
Then seek help among peers or experts
But TEST recommended solutions
-------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top