Charlotte Foust
cfoust at infostatsystems.com
Wed Mar 15 10:32:16 CST 2006
If the parent and child forms are linked, the link is between the recordsets or between the recordset on the child and unbound controls on the parent. It's essentially a join, so they don't need to read one another's values. Probably the simplest way to do it would be to store a module level value in the subform in the current event and then check it in each OnCurrent to see if it matches the Parent value. If not, change it to the new value and requery your combo. It would be even simpler to just requery it in the Current event, but that could lead to requerying it unnecessarily. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: Tuesday, March 14, 2006 6:00 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Parent form PK changed (VALUE) Is there a way (built into Access) to tell if the parent form record changed from the subform? IOW, in the case of a M-M table, implemented in a subform, one of the fields of the M-M would be the parent ID. tblCompany CO_ID CO_Name CO_Etc tblPeople PE_ID PE_Lname PE_Fname PE_Etc tblEmployees EM_ID EM_IDPE EM_IDCO If the parent form is the company, the child form is the employee, the "link" is the EM_IDCO with a combo representing the people. I want to monitor when the parent ID changes (CO_ID) from the subform sfrmEmployee. I know that the subform control has a Link Child Field / Link Master Field pair of properties, but is there a property that feeds the VALUE of the Link Master Field into the subform for it's use? The subform filters its recordset based on the Link Master Field VALUE so it must be able to see it. In fact all I want to know is THAT the Link Master Field VALUE changed so that I can requery a dependent combo in the child form. John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com