Results 1 to 3 of 3

Thread: BOF EOF (2000)

  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Columbus, Ohio, USA
    Posts
    286
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: BOF EOF (2000)

    Paul: BOF is true when the current position is before the first record in the recordset, not at the first record. HTH.

  2. #2
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    BOF EOF (2000)

    Hi, I have had a search thorugh previous posts but cant seem to find a solution to my ignorance!

    I am trying to disable / enable my custom command button record selectors depending on whether my form is displaying the 1st or last record. I thought that the following would return true if i was at the first record.

    debug.print me.recordsetclone.BOF

    but it doesnt.

    I have a form whose record source is a query, and have used the wizard to create next / prev record selectors. Why doesnt the BOF return true when i open the form or go to the first record?

    thanks
    Thanks,

    pmatz

  3. #3
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: BOF EOF (2000)

    Thanks, I see.

    After a bit of thought and trial and error...I used this code which works fine <img src=/S/bingo.gif border=0 alt=bingo width=15 height=22> !!

    Sub cmdRecordSelectors()
    With Me.Recordset
    Select Case .AbsolutePosition
    Case 0
    Me.cmdPrev.Enabled = False
    Me.cmdNext.Enabled = True
    Case .RecordCount - 1
    Me.cmdNext.Enabled = False
    Me.cmdPrev.Enabled = True
    Case Else
    Me.cmdPrev.Enabled = True
    Me.cmdNext.Enabled = True
    End Select
    End With
    End Sub
    Thanks,

    pmatz

Posting Permissions

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