Command to Close and Reopen Sub Form

  • Thread starter Thread starter orbojeff
  • Start date Start date
O

orbojeff

I'm using a VB Command to change the SQL statement on my Query
qry_SEARCH
On the main form, frm_SEARCH, I have a sub form sfrm_SEARCH bound to
this Query

I tried using Me![sfrm_SEARCH].Requery to refresh the data, but that
did not work.
Could i use to close and reopen the Sub Form?
If so what would that look like.
If not is there a better way?

Thanks
Jeff
 
I'm using a VB Command to change the SQL statement on my Query
qry_SEARCH
On the main form, frm_SEARCH, I have a sub form sfrm_SEARCH bound to
this Query

I tried using Me![sfrm_SEARCH].Requery to refresh the data, but that
did not work.

Then try directly requery the forms reocrdset, so, try

me![sfrm_Search].Form.Requery

If the above don't work, then something else seriously is wrong.

Could i use to close and reopen the Sub Form?

No, and in fact, a sub-form does not open,and close in a sense. Remember
text box controls, or any control (including a sub-form control) is a just a
control on the form. You can set what field a text box points to, and in the
case of a sub-form control, you can set what sub-form that control actually
uses. And, you can have multiple copes of the SAME sub-form on a screen, but
of course the sub-form control would have to have a different name.
 

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

Back
Top