Results 1 to 6 of 6

Thread: Record selector

  1. #1
    Join Date
    Apr 2004
    Posts
    100

    Unanswered: Record selector

    Hello everybody,

    when using a form for a table in ms access 2003 there is always the record selector on the bottom of the page. What I am looking for is an event that occurs when switching through the records using the record selector.
    Thanks for your help!!
    Proximus

  2. #2
    Join Date
    Jul 2003
    Posts
    73
    Go into the form in design mode - and look at the Form properties.

    There is a property called "Navigation Buttons" - set this to No.

    I also turn off "Record Selectors" - they messy up the form IMO.
    Joel Dixon
    Analyst Programmer
    Melbourne, Australia

  3. #3
    Join Date
    Apr 2004
    Posts
    100
    Öhm. Did you read my question? ;-)
    I know that I can hide the Record Selector.
    However I am looking for an event that raises when using the record selector. More specifically an event that raises when switching to the records? Any ideas?

  4. #4
    Join Date
    Jul 2003
    Posts
    73
    Oh yeah - must have skipped over the question - sorry.

    If you put code in the OnCurrent event of a form - it will fire everytime you move to a new record - or the current record is refreshed. This will fire upon the click of a Nav Button. That's probably what you're after.

    You can't actually surpress / preview the click of a Nav button. Personally I always hide the nav buttons and make my own set of navigation buttons.
    Joel Dixon
    Analyst Programmer
    Melbourne, Australia

  5. #5
    Join Date
    Apr 2004
    Posts
    100
    Hmm. I have already tried the On Current Event, but it didn't work.
    Here's my code:

    Dim i As Integer
    Private Sub Form_Current()
    Label75.Caption = "nr. " & i
    i = i + 1
    End Sub

    second question: isn't it possible to add code to the navigation buttons?

  6. #6
    Join Date
    Jul 2003
    Posts
    73
    Are you sure the sub is being called? (put a Msgbox "Here" in the sub - just to make sure).

    Sometimes when you don't actually assign the code from the Form itself (Form Properties > Event > On Current > Click Build (...) button > Code Builder) it won't actually call the code you've added in VBA.

    As far as I know - there's no way you can specifically respond to the click of the nav buttons. They are internal to MS Access - and don't fire any events you can respond to (other than Current of course).
    Joel Dixon
    Analyst Programmer
    Melbourne, Australia

Posting Permissions

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