locked
Copy to clipboard vs. save record RRS feed

  • Question

  • Hey there,

    I have a database that works with multiple forms. One form will take the user to other forms depending of multiple parameters until they reached a final form to update certain information. Important to say is that when I open a subsequent form I do not close the precedent one. When the user enters the info to be updated and hits a save button the following message is displayed:

    "Write Conflict, this record has been changed by another user since you started editing it. If you save the record, you will overwrite the changes the other user made. Copying the changes to the clipboard will let you look at the values the other user enterted, ant then paste your changes in if you decide to make changes".

    If I select "Save Record" then the database gets corrupted and it messes up with existing information from my source table. However, if I select "Copy to Clipboard" then everything gets updated correctly in the source table with no errors.

    My hunch is that the conflict arises because I update the info while other forms that use the same source are open. My question is that if selecting the "Copy to Clipboard" option will be a good and safe practice for the database, or do is it better to close all the precedents forms when opening a new one?

    Thanks!

    Angelica

    Monday, October 1, 2018 5:48 PM

All replies

  • Important to say is that when I open a subsequent form I do not close the precedent one. When the user enters the info to be updated and hits a save button the following message is displayed

    Hi Angelica,

    Closing of the precedent form is not necessary, but you must save the changes in the record (closing would automatically save the record). You can do this by setting the Dirty property of the calling form to False, just prior to the opening of the subsequent form.

    Imb.

    Monday, October 1, 2018 8:19 PM
  • Thanks for your reply lmb!

    Just for the sake of curiosity, what happens in the long term if I just keep selecting the "Copy to clipboard option" instead of adding this line to my code?

    Monday, October 1, 2018 9:44 PM
  • Just for the sake of curiosity, what happens in the long term if I just keep selecting the "Copy to clipboard option" instead of adding this line to my code?

    Hi Angelica,

    I really don't, I never do that.

    It seems to me that it is a last escape when there is a write conflict. Better solve the write conflict by saving, then to use a final escape. In addition it cost some additional keypresses.

    Imb.

    Monday, October 1, 2018 10:11 PM