Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004

    Unanswered: with filter and without filter


    I am a beginner with Access 2000 and VBA and I have a simple (I guess) question.

    I would like to open a form with a filter, then remove it and still have a view of the record from the filter. In the other words I would like to open a form with for example the 23rd record and then have an ability to go to next or previous record.

    I tried to use: 'FilterOn = False' while I was opening the form but in that way the form automatically returned to the first record.

    If anybody could help he I would be grateful.


  2. #2
    Join Date
    Feb 2004
    before turning off the filter store the record ID (key field) in a varaible.
    then you can insert the code example (with your mods) below the filter off call.

    ' Find the record that matches ID.
    Me.RecordsetClone.FindFirst "[YOUR_REC_ID] = " & Stored_Value
    Me.Bookmark = Me.RecordsetClone.Bookmark

    Remeber that if you are using a string for an ID value that you need to use a single quote on each side of the variable like below.
    Me.RecordsetClone.FindFirst "[YOUR_REC_ID] = '" & Stored_Value & "'"

Posting Permissions

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