Results 1 to 3 of 3
  1. #1
    sandman is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Oct 2021
    Location
    Tasmania
    Posts
    14

    REQUERY A TAB text box FROM a SUBFORM text box


    As the title suggests I have a subform that is in the tab of a main-form, and I want to requery a text box [ref2] on the tab from a text box in the subform after an entry has been made.

    should I use Me.parent.control name.requery or the Forms statement to the control.requery

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,123
    Not quite sure what your setup is but the fact that a(ny) control is placed on the form itself on on a tab control which is itself placed on the form makes no difference in how you reference the control.

    So if you want to requery a control on the main form (regardless if placed in the header, detail, footer or a tab control on any of those three sections) from a subform placed anywhere on the same form (including on a tab control) you could use
    Code:
    Me.Parent.Form.Controls("txtYourTextBoxToRequery")
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    sandman is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Oct 2021
    Location
    Tasmania
    Posts
    14
    Ok. thanks for the reply.

    This is what i am using currently Me.Parent.ref2.Requery

    What I have seems to work, although I'm not sure it will throw an error at some point. Any comments appreciated.
    Last edited by sandman; 02-27-2022 at 07:56 PM. Reason: clear and concise

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

Similar Threads

  1. Replies: 5
    Last Post: 11-06-2020, 09:44 AM
  2. Replies: 1
    Last Post: 05-18-2016, 09:46 AM
  3. After Update ReQuery and update text box
    By Eddy Sincere in forum Forms
    Replies: 4
    Last Post: 04-09-2015, 03:41 PM
  4. Replies: 3
    Last Post: 02-07-2013, 09:53 PM
  5. Replies: 1
    Last Post: 05-24-2012, 04:59 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