Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Requery a subform based on Combo Box

Geek News

Requery a subform based on Combo Box
James C. 11/19/2008 6:04:01 PM
Can someone help explain why this won't work.

I have a bound form tied to a query. On this form I have a combo box for the
user to select the criteria. I am using an After Update event in so that the
user selects the criteria from the drop-down and it simply requeries the
form. I am getting an error as it says the .Requery method or data member not
found

Here is my code

Private Sub Combo45_AfterUpdate()

Me.sub_Summary.requery

End Sub

Any ideas?
RE: Requery a subform based on Combo Box
Maurice 11/19/2008 10:20:01 PM
try adding the parentform in your requery statement so like this:

forms!Mainformname!sub_Summary.requery

where mainformname is the name of the main form as you have named it.

hth
--
Maurice Ausum


"James C." wrote:

[Quoted Text]
> Can someone help explain why this won't work.
>
> I have a bound form tied to a query. On this form I have a combo box for the
> user to select the criteria. I am using an After Update event in so that the
> user selects the criteria from the drop-down and it simply requeries the
> form. I am getting an error as it says the .Requery method or data member not
> found
>
> Here is my code
>
> Private Sub Combo45_AfterUpdate()
>
> Me.sub_Summary.requery
>
> End Sub
>
> Any ideas?

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net