From: Mark Kubicki on 24 Feb 2010 18:23 i have a form with a command button that opens another form; both have the same table as part of their record source. So, to avoid write conflicts, I close the current form before openng the new one (see code below). The problem is that I've tried several approaches that I thought would work, but I'm still getting a Write Conflict error Oddly, wheni close the second form, an reopen the first (with similar code...) I do not get the error Any suggestions would be GREATLY appreciated thanks in advance -mark code: Private Sub cmdFixtureSchedulePrintOptions_Click() On Error GoTo Err_cmdFixtureSchedulePrintOptions_Click ' With Me.Form.RecordsetClone ' .Edit ' .Update ' .Bookmark = .LastModified ' Me.Form.Bookmark = .Bookmark ' End With ' DoCmd.Close '---------------------------------------------- didn't work ' DoCmd.RunCommand acCmdSaveRecord ' DoCmd.Close '---------------------------------------------- didn't work ' DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 ' DoCmd.Close '---------------------------------------------- didn't work ' With Me.Recordset ' .Edit ' .Update ' .Bookmark = .LastModified ' Me.Form.Bookmark = .Bookmark ' End With ' DoCmd.Close '---------------------------------------------- didn't work stDocName = "frmFixtureSchedulePrintOptions" DoCmd.OpenForm stDocName, acNormal
From: Stefan Hoffmann on 1 Mar 2010 04:45 hi Mark, On 25.02.2010 00:23, Mark Kubicki wrote: > i have a form with a command button that opens another form; both have the > same table as part of their record source. So, to avoid write conflicts, I > close the current form before openng the new one (see code below). Can you post a concise and complete example? > ' With Me.Form.RecordsetClone > ' .Edit > ' .Update > ' .Bookmark = .LastModified > ' Me.Form.Bookmark = .Bookmark > ' End With > ' DoCmd.Close What do you like to achieve with this piece of code? mfG --> stefan <--
|
Pages: 1 Prev: How to use text filter in Access with SQL Server database Next: Odd Error |