How Force Subform Requery?

D

David Habercom

I have a bound subform for which I would like to force a requery after I
click in a Yes\No checkbox. How do I do this? I've tried Before &
AfterUpdate, Click, and the usual suspects. Obviously I am missing
something.

Thanks.

David
 
M

Marshall Barton

David said:
I have a bound subform for which I would like to force a requery after I
click in a Yes\No checkbox. How do I do this? I've tried Before &
AfterUpdate, Click, and the usual suspects. Obviously I am missing
something.


If you use the AfterUpdate event of a check box on the main
form, the the code would be like this:

Me.nameofsubformcontrol.Form.Requery
 
D

David Habercom

This approach doesn't seem to work in my case, possibly because the
subform's SourceObject is another form. The sequence I am after is this:

1) Click the Yes/No checkbox in the subform (the SourceObject)
2) SOMETHING (in the subform? the form?) recognizes the change and...
3) ...the SourceObject gets requeried.

Sorry if I did not make this more clear.

Thanks.

David
 
J

John Vinson

1) Click the Yes/No checkbox in the subform (the SourceObject)
2) SOMETHING (in the subform? the form?) recognizes the change and...
3) ...the SourceObject gets requeried.

Just put

Me.Requery

in the Afterupdate event of the checkbox.
 
Top