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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Requery subform after adding record

Status
Not open for further replies.

RPGguy

Programmer
Jul 27, 2001
73
US
I have a form that displays a subform showing orders. There is a command button on the form to add a record. This button goes to a seperate form to create the record. When returning to the first form the subform doesn't show the new record. I put:
Forms![frmService].[sfmService].Form.Object.Requery

after the OpenForm statement but in debug the above line gets run before I get to the 'add' form.

Thanks for your help.
 
in code: after the second form inserts the record , add code to requery your calling forms sub Form

i.e.

sub add_record()

'add record code
blah blah blah

Forms![frmService].[sfmService].Form.Object.Requery

end sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top