简体   繁体   中英

Requery Datasheet in Subform from Main form

I am using Access 2013.

I am coding a requery on a datasheet inside a subform.

My setup:

  • Using a navigation form with top and side buttons.
  • Main active form is (Main_Hub)
  • When Task tab is active the subform is (Task_List)
  • On that subform are 3 datasheet forms (Task_Form_Priority_1_High) etc...

This is when the issue starts

  • After adding a new task the datasheet form (Task_Form_Priority_1_High) does not update unless I click on the Task button (either the main task tab button or the side tab button)

I know I need to use something with Forms!subform!form.requery .

Here is an image of the form:
在此处输入图片说明

Edit:
(Main_Hub) has navigation button that has target (Task_List).
Task_List form contains 1 button to add task and 3 Datasheet forms (Task_Form_Priority_1_High), med, and low.
Those datasheet use queries as there record source (Task_Query_Priority_1_High), med, low.

You can trim down through all the forms in the following way:

Forms!Main_Hub!Task_List.Form!Task_Form_Priority_1_High.Form.Requery

The general syntax is:

Forms!MainForm!SubFormControlName1.Form!SubformControlName2.Form

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM