Subform Requery

M

MeSteve

I am trying to force a requery upon the main form activation.

I want to double click to add a new contact, which is listed in the subform.
On double click I have an 'add contact' form open. After filling and
closing, the subforms are not listing the new contact, which tells me that
the subform is not requerying. I have tried several iterations of what I
have found here, some causing errors, some not, but none causing the newly
added contact to show up without closing/reopening the main form.

Any ideas?
 
M

MeSteve

I am pretty sure I have tried both the main form and the subform. Is there
another method I could try that would force the refresh?

I have also tried closing and reopening the form via code, but that doesn't
work the way I want it to (I need it to return to the same record without
filtering all other records).
 
M

Maurice

Try the following: when you've added the record to the add contact form set
it to me.dirty=false and the set the focus back on the subform. Then perform
a requery and finally close the add contacts form.

Don't know if it will do the trick but worth trying...

hth
 

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