Results 1 to 8 of 8
  1. #1
    Richo is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2017
    Posts
    3

    Navigation Where Clause not working with reports

    I have one form called rptDocRegister and amongst the fields reported is one called [DocTypeID]. The field holds numerical (7 for policies, 8 for procedures, etc)
    I am using Navigation Form with a button with the Target Name as the report - it calls the report just fine.
    I have tried the following statement in the Navigation Where Clause and NONE narrow the report to just type 7..
    • = "[DocTypeID] = 7"
    • "[DocTypeID] = 7"
    • [DocTypeID] = 7
    • "[DOcTYpeID] =" & 7


    How do i get this to run my report and effectively do a me.filter ........


    I want to use this report multiple times to report Policies, Procedures etc.

    Anyone got the magic answer?
    Thanks
    Jim

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Not clear to me what the issue is. You say the report opens fine but then say filtering is not working.

    What method are you using to open report?
    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
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    [DocTypeID] = 7 should work if numeric
    [DocTypeID] = "7" if not numeric

  4. #4
    Richo is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2017
    Posts
    3
    Quote Originally Posted by June7 View Post
    Not clear to me what the issue is. You say the report opens fine but then say filtering is not working.

    What method are you using to open report?
    Thanks for looking at my question.

    The report is being opened by the report name being entered int the "Navigation Target Name"
    The report is NOT picking up on the Navigation Where Clause of [DocTypeID] = 7 (it is a numeric field)
    It displays ALL the records, not just those that meet the Where Clause.

    Hope that now makes sense.

  5. #5
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    The report is being opened by the report name being entered int the "Navigation Target Name"
    Where do I find "Navigation Target Name"? I'm not aware of that being a native Access feature to run reports.
    Are you using VBA or a Macro to open the report? In either case it would be helpful to see the code.

  6. #6
    Richo is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2017
    Posts
    3
    Quote Originally Posted by davegri View Post
    Where do I find "Navigation Target Name"? I'm not aware of that being a native Access feature to run reports.
    Are you using VBA or a Macro to open the report? In either case it would be helpful to see the code.
    Hi, this is a feature of the when you create Navigation Controls on a Navigation Form. This was originally release in Access 2010, and is in 2013 and 2016. It allows you to create Web like controls and buttons. - when i button is on a navigation form it is one of the three fields you can complete Under the Date items of the control. Help and other information says it can run both Forms and Reports.

  7. #7
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    Thanks for the info on Navigation Forms. I don't use those. I tried them when Access 2010 came out and found them very confusing and hard to customize. If you want to do much of anything more after dragging a form to the Navigation tab, it becomes a very sticky wicket. I avoid them in favor of a Main form with a tab control to hold additional forms.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I also have never used Navigation Form, however, did a test and the report filters just fine. Syntax shown by davegri in post 3 is correct. Cannot replicate the issue.
    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: 3
    Last Post: 10-03-2022, 12:39 PM
  2. SQL Where Clause Not Working
    By Bdenn in forum Queries
    Replies: 12
    Last Post: 05-09-2015, 09:23 AM
  3. Replies: 0
    Last Post: 12-05-2013, 01:54 PM
  4. Opening Report using WHERE CLAUSE not working
    By babui386 in forum Reports
    Replies: 2
    Last Post: 02-28-2013, 06:15 PM
  5. TOP clause not working
    By fabilewk in forum Queries
    Replies: 5
    Last Post: 08-02-2011, 12:19 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