G
Guest
Dear Group
I have a main form [Inventory] that has an embedded subform called [Containers] and field called [ContainerType]. When you have the [Inventory] main form open and if a container is not in the list in the subform [Containers], the user can click a button to bring up a pop-up form [EditContainers] in which he or she can edit the "containers" table or add a new container. Sounds pretty straightforward. The button and pop-up work fine. When you add or edit the container through the pop-up, the pop-up is updated and displays properly. However, when I close the pop-up, the [ContainerType] field in the subform [Containers] on the main form [Inventory] is not updated with the new data unless I click refresh from the menu bar.
I've tried "Me.Refresh" on close for the pop-up to no avail. I also tried Me.Refresh on the main form [Inventory] and on the subform [Containers]for both the on focus and lost focus events to no avail. Lastly, I also tried "Forms![MainFormName].SubformControlName.Form.Requery" on the On-Close event for the pop-up. Can anyone help me? I'm not sure whether to add "refresh or requery" and I'm not sure which form to add them too, the main form [Inventory], the embedded subform [Containers] on the main form, or the pop-up [ContainerType]. Also, I'm not sure where to add it (After update, On Close, etc.). Any help for this newbie is greatly appreciated. Thanks group
I have a main form [Inventory] that has an embedded subform called [Containers] and field called [ContainerType]. When you have the [Inventory] main form open and if a container is not in the list in the subform [Containers], the user can click a button to bring up a pop-up form [EditContainers] in which he or she can edit the "containers" table or add a new container. Sounds pretty straightforward. The button and pop-up work fine. When you add or edit the container through the pop-up, the pop-up is updated and displays properly. However, when I close the pop-up, the [ContainerType] field in the subform [Containers] on the main form [Inventory] is not updated with the new data unless I click refresh from the menu bar.
I've tried "Me.Refresh" on close for the pop-up to no avail. I also tried Me.Refresh on the main form [Inventory] and on the subform [Containers]for both the on focus and lost focus events to no avail. Lastly, I also tried "Forms![MainFormName].SubformControlName.Form.Requery" on the On-Close event for the pop-up. Can anyone help me? I'm not sure whether to add "refresh or requery" and I'm not sure which form to add them too, the main form [Inventory], the embedded subform [Containers] on the main form, or the pop-up [ContainerType]. Also, I'm not sure where to add it (After update, On Close, etc.). Any help for this newbie is greatly appreciated. Thanks group