Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / March 2005

Tip: Looking for answers? Try searching our database.

Identify the first visible record in a continous fofr

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gianluca - 10 Mar 2005 20:11 GMT
Is there a way to determine by code what record is currently the uppermost
visible record in a continuous form?
Me.SelTop return the selected record.
But I need the user to select a record and the vba code
to know both the selected record and the first visible record of the form.

-I need to do some operations, update some records
- requery the form
- positioning the form so that the first visible record is
 the same first record before my operations

Is there a way to do this ?
Thanks in advance
Gianluca
Jonathan Parminter - 11 Mar 2005 02:25 GMT
> Is there a way to determine by code what record is currently the uppermost
> visible record in a continuous form?
[quoted text clipped - 10 lines]
> Thanks in advance
> Gianluca

Hi Gianluca,

use the following as an example (air code)...

' have variable to store unique identifier for record
dim lngRecordId as long

' assign unique value to variable
lngRecordID = txtRecordID

' code here to do whatever....

' use recordset clone to return to record

me.recordsetclone.findfirst "RecordID=" & lngRecordID
me.bookmark=me.recordsetclone.bookmark

Luck
Jonathan
Gianluca - 11 Mar 2005 09:35 GMT
> > Is there a way to determine by code what record is currently the uppermost
> > visible record in a continuous form?
[quoted text clipped - 30 lines]
> Luck
> Jonathan

Hi Jonathan
I agree with you if i need to set as first record of my form
the record i have modified, but my situation is a little different
Example:
in my continous form i have 20 records.
I scroll the form in order to have as first visible record the
number 12 (or RecordID=12; this is the information i need).
The last visible record in the form is the number 20.

Then i modify the recordID=18.
I make some operations on all 20 records.
I refresh the form
Now i need to have as first record visible in the form the n° 12.

The code you wrote me is ok to do the last positioning, but is not
ok (i think) to be able (in any moment and via code) to get the recordID
of the first visible record (in my example recordID is 12) of the form.

Can anyone help me?
Gianluca
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.