Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference a control from within a subform from a popup form

Status
Not open for further replies.

spiralmind

Technical User
Aug 20, 2002
130
US
I have a small popup dialog for removing items from a list that is opened by clicking on a "Remove Items" button on the main form. The popup then displays a list of items that can be removed, from which the user can select one and click on a button to remove it. This popup works perfectly, but the main form contains lists of the same objects (these lists are for a different, more frequently performed task) which do not update when they are removed. I would like to requery these list every time an item is removed (attaching the code to the popup's "remove" button}, or at least when the popup is closed (attaching the code to the popup's "exit" button, but I can't seem to find a way to reference the listboxes (which reside on a subform within another form which doesn't have the focus) within my code.
- All suggestions wecome.
 
without actually creating a test case, my suggestion would be:
Forms("MainFormName")("SubFormControlName").Form("ControlName").Requery

Where SubFormControlName is the name of the control in which the SubForm is 'enclosed' in the main form, and "Control" is the name of the control in the sub form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top