Results 1 to 8 of 8
  1. #1
    BigLou is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    4

    ApplyFilter in a form works fine, but not when moved to Navigation Form

    I am trying to get the following command (which works fine within the form “Need to send First Letter - Specified Range”) to work with the same Form moved into a Navigation Form. The record source for this Form is a query named “Need to Send First Letter”. It has 2 unbound text boxes called Minamt and Maxamt – where you can put a high and low number that you want to search between to narrow your results. Here’s the command:
    DoCmd.ApplyFilter , "[TOTALTAX] Between [Forms]![Need to send First Letter - Specified Range]![Minamt] And [Forms]![Need to send First Letter - Specified Range]![Maxamt]"



    When I run this within the Navigation Form (Named Navigation Form) I get a Run-time error ‘2491’ – The action or method is invalid because the form or report isn’t bound to a table or query.

    I have searched high and low and tried multiple things, but cannot figure out what I need to do to make this work. Can anyone help?
    Last edited by BigLou; 08-13-2015 at 08:39 PM. Reason: Spelling error

  2. #2
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    Basically, the message means the form isn't bound to a table or updateable query, so you cannot apply a filter - there are no records bound to the form. However, you are showing the filter expression that was on your first form without mentioning if you changed the form reference to the navigation form, so the reference may be invalid.

  3. #3
    BigLou is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    4
    I have tried changing the reference - but that's my problem. I obviously don't know how to do it correctly, because nothing I have tried works. How do I change this?

  4. #4
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    I guess I'm not understanding and have no idea what the same Form moved into a Navigation Form means. I don't get how it can be the same form yet be moved to a form with a different name. If your expression worked before, and is looking at the same data but from a different form named "Navigation Form", then is the expression now not

    DoCmd.ApplyFilter , "[TOTALTAX] Between [Forms]![Navigation Form]![Minamt] And [Forms]![Navigation Form]![Maxamt]" ?

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,643
    Don't like don't use navigation form. Review https://www.accessforums.net/forms/t...orm-32053.html
    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.

  6. #6
    BigLou is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    4

    Navigation Forms response

    Quote Originally Posted by Micron View Post
    I guess I'm not understanding and have no idea what the same Form moved into a Navigation Form means. I don't get how it can be the same form yet be moved to a form with a different name. If your expression worked before, and is looking at the same data but from a different form named "Navigation Form", then is the expression now not

    DoCmd.ApplyFilter , "[TOTALTAX] Between [Forms]![Navigation Form]![Minamt] And [Forms]![Navigation Form]![Maxamt]" ?
    No - that doesn't work. Navigation Forms are a way to create a nice looking tabbed interface in Excel. You just drag and drop your forms into it. Looks great - just doesn't work simply and apparently the syntax isn't logical. Lots of people have had similar issues with these.

  7. #7
    BigLou is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    4
    Quote Originally Posted by June7 View Post
    Don't like don't use navigation form. Review https://www.accessforums.net/forms/t...orm-32053.html
    Thanks, but this didn't really help. I have tried several things found in Google searches, but none have worked for me. Guess Ill drop trying to use the Navigation Form.

  8. #8
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    Quote Originally Posted by BigLou View Post
    No - that doesn't work. Navigation Forms are a way to create a nice looking tabbed interface in Excel. You just drag and drop your forms into it. Looks great - just doesn't work simply and apparently the syntax isn't logical. Lots of people have had similar issues with these.
    Yeah, I Googled it after I posted. Sometimes my cart is in front of my horse Kinda sounds like a fancy tab control.
    I'd like to update Access but can't justify it for recreational use. Sometimes I do work for my former employer, whose idea of updating MS Office in 2010 was to dump 2003 and buy 2007. Un-freakin believable for a company that generates $50 mil in sales every year!!

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

Similar Threads

  1. Replies: 1
    Last Post: 07-18-2015, 08:02 AM
  2. Replies: 2
    Last Post: 12-07-2014, 10:03 PM
  3. Replies: 1
    Last Post: 11-14-2014, 05:12 PM
  4. Replies: 6
    Last Post: 10-15-2014, 02:45 PM
  5. Replies: 7
    Last Post: 06-10-2013, 12:40 PM

Tags for this Thread

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