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

BOOKMARK MOVES RECORD SELECTOR TO TOP

Status
Not open for further replies.

SeanB

Programmer
Jul 19, 2001
70
0
0
US
Hello all. I have an ADP application that I need to requery all the time to get the most recent info back from SQL Server. However, the only issue I am running into is on the Bookmark so I can keep the place or on requery I lose the bookmark in ADP the scroll bar moves and the user gets confused because they think they have not clicked anything. Any ideas?
 
dim rst as recordset
dim myID 'Value of current ID field

'Before requery remember ID field's value

myID = me.MyFieldID

me.requery
set rst=me.recordsetclone
'Find previouse record
rst.findfirst "MyFieldID=" & myID 'Use ' for text field
'or # for date field such
'rst.findfirst "MyFieldID='" & myID & "'"

if not rst.nomatch then
me.bookmark=rst.bookmark
end if
rst.close
set rst=Nothing

Aivars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top