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

Move to the last record in a MSHFlexGrid

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
is it possible to move to the last record in a MSHFlexGrid?
If so how? I am exporting records from the grid and the only way my code works is if I highlite the last record.

Thanks DVannoy
A+,Network+,CNA
dvannoy@onyxes.com
 
you can get your last row by setting your row number = rs.recordcount
 
even if the number of records will change? DVannoy
A+,Network+,CNA
dvannoy@onyxes.com
 
If the number of record change jus requery your rs and reset your row number
 
I need the focus to be the last record in the grid. as if i clicked my mouse there.I cannot get the code to work DVannoy
A+,Network+,CNA
dvannoy@onyxes.com
 
Try putting this in the event that you want to set focus on the last row with.

flexDA.TopRow = flexDA.Rows - 1 Rob
Just my $.02.
 
Sorry, I copied my code and did not change the names.

flexGrid.TopRow = flexGrid.Rows - 1

I put this on the form activate event in my code. Every time an item is added to the grid, the grid form gets focus. This code keeps the selected row on the last row added.
Rob
Just my $.02.
 
I get invalid row..I tryed -2 etc.. the last part of your code flexda.rows -1

the MSHFlexgrid does not have "rows" but only Row.

e.g. MSHFlexGrid.Row -1

That may be the problem DVannoy
A+,Network+,CNA
dvannoy@onyxes.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top