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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top