Results 1 to 4 of 4
  1. #1
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194

    using a Macro to SEARCH for record.. not filter it!

    Hi pplz.
    I have 2 forms:
    • MainMenu
    • Claim


    I have a button MainMenu that goes opens up Form Claim at ="[ClaimNumber]="&[ClaimCombo] Where ClaimCombo is a dropdown box on my MainMenu form.

    This all works well except after i get to the Claim Form i cant go to next record or last record as it is FILTERED...

    So now i have macros: Open form "Claim" and then Search Form Claim for "[ClaimNumber]="&[ClaimCombo]... which is a bit silly as it flickers coz it opens up Claim Form at (eg) Claim 1401 but then as Combobox is 1409 it flickers from 1401 to 1409 fast...

    Any ideas?
    I also tried open form and filter to selected Claim and then remove filters but of course it jumps back to the first damn Claim again!!!



    Please help

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,824
    I use bookmarks to go to record. Example:

    Me.RecordsetClone.FindFirst "LabNum='" & Me.OpenArgs & "'"
    Me.Bookmark = Me.RecordsetClone.Bookmark
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194
    hmmm ok im sure ur onto something here, but its a bit more advanced than i understand so far... is there no way to do with macros? or perhaps could you explain a bit better how i can use this?

    thanks for your response!

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,824
    I don't use macros and don't know if they can handle bookmarks, I doubt it.

    What exactly do you not understand?

    OpenArgs is a property of form. Info can be passed to a form through OpenArgs. So I open form like:

    DoCmd.OpenForm "form name", , , , , , Me!LabNum

    Then the earlier code goes behind the form being opened.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 02-27-2014, 08:06 PM
  2. Adding Filter Using Macro
    By TxTcher in forum Forms
    Replies: 1
    Last Post: 02-05-2013, 02:16 AM
  3. MACRO to filter
    By DAE60 in forum Programming
    Replies: 1
    Last Post: 11-13-2012, 02:10 PM
  4. Macro to Auto Filter
    By skinny1434 in forum Access
    Replies: 1
    Last Post: 06-14-2012, 01:13 PM
  5. Macro - Filter by scheme
    By erikl1 in forum Access
    Replies: 3
    Last Post: 02-27-2012, 01:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums