Results 1 to 9 of 9
  1. #1
    sah is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    37

    Unhappy Write Conflict

    Hi Everyone,
    I have 2 forms one is for user administration which opens the other form user modification.

    "Form user administration" has buttons to add,delete,modify user and the user data comes from a table Users in splitview,with usertype and username fields.
    When user selects a record and clicks "modify" the values of selected record are sent to open modify form with selected record as openargs


    "Form User Administration" is open in the background but cant be edited,closed etc.
    "Form modify user" now opens up with the openargs values and places these values in existing user textbox for usertype and username and there 2 fields for typing new username and usertype so that existing gets replaced with new ones. There is button called modify now on "modify form" which when clicked is showing write conflict error dialog saying 2 save changes,copy to clipboard,discard changes. if i save record, search key is not found error appears later, if i discard unknown changes to other users takes place.
    I tried event on deactivate for both forms with vba code DoCmd.RunCommand acCmdSaveRecord but nothing is solving my problem.
    I tried to set record locks property "Edited Locks" in Data Tab of Property sheet for the forms in design view. It still shows the same problem.

    there is some problem when i try to work on the same record in 2 forms.
    Click image for larger version. 

Name:	pic ad.JPG 
Views:	10 
Size:	17.2 KB 
ID:	7315

    Click image for larger version. 

Name:	Pic both.JPG 
Views:	10 
Size:	45.0 KB 
ID:	7316

    Click image for larger version. 

Name:	Pic modify.JPG 
Views:	10 
Size:	20.1 KB 
ID:	7317

    Pleeeease Help.
    Attached Thumbnails Attached Thumbnails pic ad.jpg  

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,735
    Working on same record on two forms is like two people working on the same record from two instances of the db. This can create conflict.

    I have a similar setup. Records are listed in datasheet subform on 'administration' form. But the subform is not editible. Select record and another form opens for data edit.

    I would have to analyse your project if you want to provide. Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    sah is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    37

    here is the file

    I went through the debug site but i am still unable to solve my problem.
    Below is the db file, login as type : admin, username : bye, password : bye
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,735
    I started to test and ran into error about missing table PMSUsers. There is only one table in this db and it is named Users.
    Last edited by June7; 04-23-2012 at 07:11 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    sah is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    37
    Hi,
    Replace PMSUsers with Users wherever you find it and thanks for testing it.
    Do ask for any such problems which arise.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,735
    What I see happening is when the Modify form is opened, the record on Administration form is put in edit mode by code replacing values. The edits have not been committed to table (as evidenced by the pencil icon on Administration form) so the Modify form still has access to the old values. Then you try to change the record that is still locked in edit mode with data from the Modify form. This simply will not work. I really don't understand the need for second form. Why not show all the fields on the Administration form and do edits there?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    sah is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    37
    Hi June 7,
    Thanks for your patience in testing the db.
    The db is meant purely for basic computer literates like those who know how to click the buttons by reading the names on buttons. Doing changes on forms directly confuses them, like knowing if changes have been committed or no(db warnings set to false). They keep coming and asking if changes have been made???
    Hence i wish to make this kind of db purely working on flow of direction like on what change what event may follow next.Users should be able to understand each change they make clearly.
    You may say who on earth may not be able to understand ms access but i have people who are having a bit of difficulty with this. Hope you understand what i am trying to say.
    I request you earnestly if you have an alternate basic solution. This db would contain no more than 500 rows at any point of time and people here propose to use it for another 5-10 years. Hence ms access was chosen over oracle etc.
    This is the reason that i am not worrying of search retrieval time etc. for searching particular records. Ms Access can handle 500 easily. Actual limit of records proposed is 100 but for safe side i wish to scale and test it on 500 records with Users table records limit of 150 on stand alone system not even sharing between users( workgroup and users etc). Sharing on network is to be done only if this system works well for 4 months.
    Please help.
    Also if possible direct me with codes, samples,etc. anything which you think may prove to be helpful.
    Regards.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,735
    I don't understand the user confusion. The data can be seen on main form. If they don't like what is there then edit by typing other data. The change is immediate and apparent.

    To do what you want would require using unbound textboxes on second form and code to populate with the current values then set the record to the 'NONE' values and save record to commit and unlock the record. Then in the second form user will see the old values in the unbound textboxes on left side and enter new values into bound textboxes on the right.

    You already have examples of necessary code in your project, now mostly a matter of applying logic and getting code to execute in proper sequence to accomplish what I describe.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    sah is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    37
    Thanks a TON June 7!!!!
    Kept both sides "existing and new" unbounded and got desired results.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Write Conflict Issues
    By AndrewsPanda in forum Access
    Replies: 2
    Last Post: 10-05-2011, 02:30 AM
  2. write conflict error
    By karuppasamy in forum Access
    Replies: 1
    Last Post: 06-07-2011, 12:23 PM
  3. Write Conflict Demonstration
    By pkstormy in forum Code Repository
    Replies: 1
    Last Post: 12-02-2010, 08:25 PM
  4. Write Conflict Errors with SQL-Access DB
    By trb5016 in forum Access
    Replies: 5
    Last Post: 01-14-2010, 02:10 PM
  5. Write Conflict Error
    By botts121 in forum Access
    Replies: 5
    Last Post: 09-25-2009, 12:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums