Write Conflict on form converted from Access 2000 to ACcess 2003

G

Guest

I converted a database to Access 2003 and this form is now producing a Write
Conflict trying to save the record and I am the only user in the database.
It was working fine before the conversion. The code it is executing is
simply:

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

This only occurs when adding a new record. The same code is used for
updating the record and that works fine. The form is based on one table.
The database is a linked SQL Server database. The OS on the PC is Windows
2000.

Thank you for any help you can give me.
 
J

John Vinson

I converted a database to Access 2003 and this form is now producing a Write
Conflict trying to save the record and I am the only user in the database.
It was working fine before the conversion. The code it is executing is
simply:

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

This only occurs when adding a new record. The same code is used for
updating the record and that works fine. The form is based on one table.
The database is a linked SQL Server database. The OS on the PC is Windows
2000.

Thank you for any help you can give me.

That's MOLDY old 7.0 menu code - why the wizards still offer it is a
mystery to me!

Try replacing this line with *either* one of:

DoCmd.RunCommand acCmdSaveRecord

or

If Me.Dirty = True Then Me.Dirty = False

to save the record. Just be sure that there isn't some *other*
operation which is already trying to save the record; ordinarily you
don't need any code to save the record as it saves automatically when
you move off the record.

John W. Vinson[MVP]
 

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