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!

updating a subform record with matching ID

Status
Not open for further replies.
Jan 14, 2002
143
US
Hello,

I would like to update a record in a subform after updating another subform with the same matching ID using an AfterUpdate Event. Does somebody know how, if possible, I specify a criteria so the right record gets updated?


This won't work because no criteria is specified:

me.parent![OtherSubform]![myField]=me![myField]



Any help is very appreciated!





 
I'd try approaching this by putting the Id into a global constant, then opening the underlying table in the second subform by using DAO and the FindFirst method, followed by the edit method and the update method. It's likely to be less problematic in the long run. Having done the update, behind the scenes as it were, you should the use the requery method to put the right data back into the subform.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top