Results 1 to 9 of 9
  1. #1
    mikeone610 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    39

    Trouble referencing controls on navigation subform

    Hi. I am having trouble referencing controls on navigation subform. I built a form to run my query (SearchForm) and got it where I wanted then I created a navigation form and I typed in the name of the query (SearchForm) on the tab everything loaded and now it keeps asking me for parameters for all of my controls on the query (SearchForm). I figured out I have to change the name of the criteria in the query design view now that it is on the navigation subform but it still ask for the parameters.



    This is what I have in the query design view:

    Field: Fname
    Table:Sea
    Group By

    Criteria: Like "*" & [Forms]![NavigationForm].[Form]![NavigationSubform].[Forms].[FNametxt] & "*"

    I thought this was the right format for it. The one thing that is strange is I am use to Access suggesting what to type after Form and when typing in this Criteria it did not do that after the [NavigationSubForm] part.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Google: Access controls on subform on navigation form

    Does this help
    http://social.msdn.microsoft.com/For...0-d94d6c9696a6
    https://www.accessforums.net/forms/n...ers-28983.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.

  3. #3
    mikeone610 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    39
    No I am not working with Macros I am trying to reference it directly on the criteria field in the queries design view. Side question, is it better to use navigation forms or navigation buttons on your preexisting forms?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Whether referencing controls from macro, query, VBA, or in a textbox, I think the issue is the same. I haven't used navigation form structure and from what I have seen don't want to.
    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.

  5. #5
    mikeone610 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    39
    Quote Originally Posted by June7 View Post
    Whether referencing controls from macro, query, VBA, or in a textbox, I think the issue is the same. I haven't used navigation form structure and from what I have seen don't want to.
    Would you recommended another way to navigate around the form?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    It should be possible, just have to get the syntax right, which is something I have not attempted with navigation form. The referenced links are what I found from a Google search. If those did not help, maybe your search will be more successful.
    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.

  7. #7
    mikeone610 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    39
    Thanks June for you opinion on this. Now solution yet but if and when I locate it I will post it here.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    I did some quick experimentation with navigation form and referencing controls. These things act bizarre.

    I created navigation form with two tabs and forms on the tabs. Then I put a textbox on the main form. I enter an expression in ControlSource to reference a field on tab 1 subform. When I have that tab selected the popup intellisence shows fields from that form. I select tab 2 and those fields show. The expression is:

    =[Forms]![NavigationForm]![NavigationSubform].[Form]![Base]

    In form view when tab 1 is selected that textbox shows value from the active record. I select tab 2 then the textbox shows #Error.

    This shows how tricky it is to reference controls in navigation form.

    This link from the second reference of earlier post might have the solution. It describes using a temp var, something I've never done. http://social.msdn.microsoft.com/For...a-c4c2a67f39c0
    Last edited by June7; 02-04-2013 at 04:00 PM. Reason: edit typo
    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.

  9. #9
    mikeone610 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    39
    Yeah it is kinda crazy to me why they are so hard to reference I have found about 5 different forum post where folks are trying to do something similar but the solution they post never seem to work. I am going to take a look at this, thanks.

    EDIT: SOLVED!

    Unreal. So I read a ton of stuff about this problem and I have not seen anyone use what worked for me. After dropping my Form into my Navigation Form I had to change the criteria to this:

    Like "*" & [Forms]![NavigationForm]![NavigationSubform]![FnameTxt] & "*"

    For whatever reason it works.
    Last edited by mikeone610; 02-04-2013 at 08:24 PM.

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

Similar Threads

  1. Replies: 4
    Last Post: 10-08-2012, 05:33 PM
  2. Referencing subform controls
    By cheyanne in forum Forms
    Replies: 7
    Last Post: 04-30-2012, 10:00 AM
  3. Referencing Controls on Forms
    By cbh35711 in forum Access
    Replies: 7
    Last Post: 04-05-2012, 09:04 PM
  4. Referencing a form in a subform
    By 161 in forum Forms
    Replies: 3
    Last Post: 01-24-2011, 03:58 PM
  5. Replies: 10
    Last Post: 12-31-2010, 12:35 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