• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 538
  • Last Modified:

Write conflict

I have a form and on the form I have a command button which when clicked makes a 2nd form pop up.  Both forms are bound to the same record source.  But after the user enters information in the 2nd form and then closes it all is fine until he tries to close the main form.  He gets a Write Conflict popup.  (See attached).

Why is this happening?


1 Solution
Dale FyeCommented:
chances are that you made changes in the main form, then made subsequent changes in the 2nd form.

When you saved the changes in the 2nd form, you need to update those fields in the main form as well, or you will get this conflict.  If you are not actually displaying those fields in the main form, you should remove them from the query that is the record source for the main form.
Rey Obrero (Capricorn1)Commented:
you can try this, in the click event of the button that opens the second form

private sub btn_click()
if me.dirty then me.dirty=false     'save the edited or new record

docmd.openform "yoursecondformname"

end sub
SteveL13Author Commented:
Actually I made change.  I removed the command button which opened the 2nd form and put the text box that was on the second form onto the 1st form.  But now when the user makes an entry in that text box it indicates that it was "#Deleted" and then a message pops up saying "Record is deleted".

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
What's the reason for having a popup based on the same recordsource? In most cases, you're much better off including all needed fields on the main form.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now