determining location

Results 1 to 3 of 3

Thread: determining location

  1. #1
    Join Date
    Dec 1969

    Default determining location

    how do i find out if the current record of a recordset is the first or last record in that recordset? neither eof and bof would work, as they only tell you if the position of the recordset is before or after the first or last record.<BR><BR>thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: determining location

    Use Recordset.AbsolutePosotion

  3. #3
    Join Date
    Dec 1969

    Default another more secure way...

    another secure n simple way for doing that.<BR>----------------<BR>for first record<BR>----------------<BR>if not rs.bof then <BR> rs.MovePrevious &#039;Go one record back<BR> if rs.bof then <BR> &#039;First record<BR> else<BR> &#039;Not the first record<BR> end if<BR>end if<BR>---------------<BR><BR>----------------<BR>for last record<BR>----------------<BR>if not rs.eof then <BR> rs.MoveNext &#039;Go one record ahead<BR> if rs.eof then <BR> &#039;Last record<BR> else<BR> &#039;Not the Last record<BR> end if<BR>end if<BR>---------------<BR><BR><BR>Rahul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts