Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

requery not working

Status
Not open for further replies.

rry2k

Programmer
Jun 28, 2001
678
US
I have an app with a form and subform. The form displays records in datasheet view and when a button is clicked I bring up a different form to add a new record. The problem is: when the user clicks close and goes back to form1 the new record isn't there until I close the form and go back in. I've tried refresh and requery on various events but no luck.

Thanks for the help..Russ
 
Try this in the Close event

Application.Forms.Item("frmToRequery").Requery
 
Hi!
Forms("frmToRequery").Requery
or
Forms!frmToRequery.Requery

If you want to requery subform then:
Forms("frmToRequery")("SubformName").form.Requery
or
Forms!frmToRequery!SubformName.form.Requery

Aivars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top