M
Mark Kubicki
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
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