Heenan, Lambert
Lambert.Heenan at chartisinsurance.com
Wed May 12 09:02:05 CDT 2010
Like for instance when the parent form loses focus to the sub-form? That might we where you want to save the parent's data. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Wednesday, May 12, 2010 9:17 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Write Conflict Error Hmm. Form and sub-form using the same table... Well as you are getting the conflict error when the parent form tries to save the sub-form's data that implies that the parent has edited the data too. So is there any convenient point in the process where you can call Me.Dirty=False on the parent form prior to allowing the sub-form to edit data? Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, May 11, 2010 7:32 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Write Conflict Error Lambert: I had already tried Dirty = False but the problem occurs in the line: Forms!Matters!MatterActionsSubform.Form.Dirty = False Which is being issued from a different form named MatterActionDates The record sources for MatterActionsSubform and the calling form, MatterActionDates, share a table. The calling form's record source uses MatterActionDates: SELECT MatterActionDates.* FROM MatterActionDates ORDER BY CInt(Nz([Y])), CInt(Nz([M])), CInt(Nz([D])); The record ssource for MatterActionsSubform is: SELECT MatterActionDates.MatterActionDatesDefaultOffset, MatterActionDates.Y, MatterActionDates.M, MatterActionDates.D, * FROM qryMatterActions LEFT JOIN MatterActionDates ON qryMatterActions.MatterActionID = MatterActionDates.MatterActionID WHERE (((MatterActionDates.MatterActionDatesDefaultOffset)=True) AND ((qryMatterActions.MatterID)=7756) AND ((qryMatterActions.Closed)=False)) ORDER BY qryMatterActions.DueDate; So they're sharing the table MatterActionDates. (qryMatterActions uses only the table MatterActions) Any clues here? TIA Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Tuesday, May 11, 2010 9:59 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Write Conflict Error Is it a bound form? Are you also editing the data in the code behind the form? If so you need to save the bound form record before making any edits in code. TO save the record: Me.Dirty=False Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, May 11, 2010 12:43 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Write Conflict Error Dear List: I'm getting a write conflict error in a form but it's not consistent. So I'm not sure where to begin. I'm running the FE and BE locally - just me in the system. Any clues on where to start looking appreciated. MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com