write conflicts

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
 
S

Stefan Hoffmann

hi Mark,

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 <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top