Subform Requery

  • Thread starter Thread starter MeSteve
  • Start date Start date
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?
 
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).
 
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
 
Back
Top