Hi All,
I have a form called frmAccountsReceivable. This form contains a subform call sfrmPayment. I would like to requery a list on frmAccountsReceivable after updating a textbox on sfrmPayment. I'm not sure how to code this.
Thanks,
Leesha
Hi All,
I have a form called frmAccountsReceivable. This form contains a subform call sfrmPayment. I would like to requery a list on frmAccountsReceivable after updating a textbox on sfrmPayment. I'm not sure how to code this.
Thanks,
Leesha

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
To refer to the main form from the subform, you can use Parent. So you'd get something like this:
Private Sub txtSomething_AfterUpdate()
Me.Parent.lstOther.Requery
End Sub
Hi Hans,
Thanks for the quick response. Would I use the same code if the after update is in a subform that is in a subform on the parent form?
Parent form = frmAccountsReceivable
frmPayment is a subform frmAccountsReceivable
within frmPayment is sfrmPaymentAllocations which is where the actual requery of lstEdit (on frmAccountsReceivable) should be happening.
Not sure if that makes sense.
Leesha
Since you want to requery a list box from two levels down, you would need Parent twice to refer to something on the main form.
Me.Parent.Parent.lstOther.Requery
Thanks Hans!!!
Leesha