Results 1 to 4 of 4
  1. #1
    Sa'El is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Posts
    40

    Navigation Form Control: Syntax for Navigation Where Clause

    Hi All,

    Does anyone know how to use the Navigation Where Clause in a Navigation Control to refer to a control on the parent form? I am utilizing the Navigation Control on a Form and I have been able to add an object to each navigation tab and setting the "Navigation Where Clause" for the embedded internal to itself, e.g. [ID] = Numeric Value

    However, what I would like to do is set the Navigation Where Clause to an ID on the Parent form that the Navigation Control is embedded on. Thus, when the Parent form is loaded with its specific ID, the Navigation Control and all its subforms would only show records with that Parent ID. I have been searching the net for the past couple of hours with no luck. I have used different syntaxes to do this, including "[fieldname ] = Forms![ formname ]![ controlname on other form ]"
    from MS Support and other variations with no luck.



    I guess I can attempt to refer to the parent form from the embedded object to filter, but I would imagine it would perform better if the the filtering was done via the navigation control instead. Any help would be appreciated, thanks.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    in vb code, take the path of the form OUTSIDE of the quotes...

    "[fieldname ] ='" & Forms![ formname ]![ controlname on other form ] & "'"



  3. #3
    laycenew is offline Novice
    Windows 11 Office 365
    Join Date
    Oct 2022
    Posts
    2
    Quote Originally Posted by Sa'El View Post
    Hi All,

    Does anyone know how to use the Navigation Where Clause in a Navigation Control to refer to a control on the parent form? I am utilizing the Navigation Control on a Form and I have been able to add an object to each navigation tab and setting the "Navigation Where Clause" for the embedded internal to itself, e.g. [ID] = Numeric Value

    However, what I would like to do is set the Navigation Where Clause to an ID on the Parent form that the Navigation Control is embedded on. Thus, when the Parent form is loaded with its specific ID, the Navigation Control and all its subforms would only show records with that Parent ID. I have been searching the net for the past couple of hours with no luck. I have used different syntaxes to do this, including "[fieldname ] = Forms![ formname ]![ controlname on other form ]"
    from MS Support and other variations with no luck.

    I guess I can attempt to refer to the parent form from the embedded object to filter, but I would imagine it would perform better if the the filtering was done via the navigation control instead. Any help would be appreciated, thanks.
    I've learned by accident a few days ago (after many many hours of research and trial and error), that the filter will not apply if you switch from design mode to form mode. You MUST close and reopen the form for the filter to apply.

    Here's a link that might be helpful to some future developers that are also searching the same thing.
    https://www.iaccessworld.com/use-navigation-clause/

    Sorry for bumping an old post, but I thought maybe it might help to contribute what I've learned to this post in case someone else has the same issue with their navigation control. I haven't been able to find much information at all on Navigation Controls/Navigation Where Clause. I could have saved myself so much time if it had been shared somewhere.

    FWIW, most people seem to prefer tab controls over navigation controls, even though they both do the SAME EXACT thing (with the exception of being able to have side tabs in a navigation control). I can see why, because navigation controls seem difficult at first, but they're actually quite helpful once you tinker around with them. Originally, my database forms were totally built in tab controls, but one day after building a report with 2 subreports, my database maxed out on the number of "open databases" I could have at a time (it's 255) and would crash. I didn't know there was a limit! This includes combo boxes and drop down boxes, and all the queries that your tab controls are based on. When you have a tab control, all the queries are opened. ALL of them.

    After a little research, I learned that navigation controls would be the better solution for me, because the only queries being opened are the ones for the active tab. The queries for the other tabs do not get opened until you go to them. I converted all my tab controls into navigation controls, and my database runs so much faster now, and the number of "open databases" (queries) at a time dropped significantly.

  4. #4
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    Hmmm, seems I lost my last post.
    the only queries being opened are the ones for the active tab. The queries for the other tabs do not get opened until you go to them.
    Briefly, as already stated you can load/unload 1 form at a time in a tab control and get the same efficiency improvement, so there's that.
    As long as one is aware of the limitations/complications I say "suit yourself " and do what you think is best.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 5
    Last Post: 03-02-2015, 02:14 PM
  2. Replies: 2
    Last Post: 11-27-2014, 01:06 PM
  3. Replies: 5
    Last Post: 11-04-2014, 08:13 AM
  4. Opening a Form within Navigation Control
    By karla.uptown@gmail.com in forum Access
    Replies: 5
    Last Post: 10-08-2012, 10:55 AM
  5. Navigation Form control syntax 2010
    By AndycompanyZ in forum Forms
    Replies: 2
    Last Post: 06-28-2011, 07:23 AM

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