Results 1 to 2 of 2
  1. #1
    npa3000 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2019
    Posts
    5

    Reference a txtBox in subform NavigationPanel

    Hello,



    I currently have a Navigation Panel (MainNaviForm) and a subform(CommisionNaviForm) that loads every time i hit the corresponding button in the NavigationPanel.

    I want to run an sql query that takes as parameter a txtBox in CommisionNaviForm, so i use this: [Forms]![MainNaviForm]![CommisionNaviForm].[Form]![txtSupplier] but it doesn't work.

    What do you suggest?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    By 'Navigation Panel (MainNaviForm)' do you mean a Navigation Form? And by 'button in the NavigationPanel' you mean a form listed in Navigation Panel?

    Referencing a subform requires referencing the subform container control. I always name this control different from object it holds.

    In a Navigation Form, this subform container is assigned a default name of NavigationSubform, so try:

    [Forms]![MainNaviForm]![NavigationSubform].[Form].[txtSupplier]
    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: 8
    Last Post: 02-22-2017, 10:38 AM
  2. reference objects on subform
    By gammaman in forum Modules
    Replies: 2
    Last Post: 08-27-2015, 07:31 AM
  3. Replies: 5
    Last Post: 06-23-2012, 10:30 PM
  4. Replies: 5
    Last Post: 09-29-2011, 04:11 PM
  5. Query reference to a subform
    By hawkins in forum Forms
    Replies: 3
    Last Post: 08-05-2011, 10:49 AM

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