Results 1 to 4 of 4
  1. #1
    Pox is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Sep 2018
    Posts
    3

    Record Locking using a secondary form to edit long text field


    I have a small sales office and have written an Access 2016 muliti-user database for the staff to view client data and track sales and contacts. We often work on the same client simultaneously and this often causes locking conflicts. I am struggling to work this out. I am not a professional programmer but have a pretty good grasp of VBA and like it. Our main form is bound to our main database. It has lots of controls and tabs to view client information and run reports. It is bound so it allows users to edit data. Users can click to open a second form that allows editing of our ClientNotes field, which is a long text field. Most of the conflicts occur when using this second form to edit ClientNotes. I have tried to use Recordlocks to lock or unlock these forms, and have tried it different ways but nothing has worked very well. At this time the ClientNotes field is a part of the main Client database, but I could put it in a related database I guess. I seek advice on how to set this up. Thanks for any help.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Try this before opening the second form:

    If Me.Dirty Then Me.Dirty = False

    That will save the record on the main form so the second form can edit it. That won't help with multiple users trying to edit the same record.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Pox is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Sep 2018
    Posts
    3
    OK
    That sounds good
    How do I set the forms' Recordlocks?

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    At this time the ClientNotes field is a part of the main Client database
    Hopefully you don't plan on one database per table?
    Because of that statement, I'm not understanding if the conflict is because the notes and the rest of the fields are coming from the same table or query, or some other reason. I suspect they are, and you are using a sort of modal form to edit notes. This might explain why you had no success with record locks. If you have no locks, you will get warnings from Access that are sure to confuse the users. If the notes are part of the same record source, then would you not want Access to prevent editing of the notes portion of the record? I would think so, one reason to follow*.

    Possibly separate notes into their own table and put them in a subform of the main form, assuming you want to see the notes while looking at the main record? If you don't need to see the notes related to the main record, probably even better. You should be able to edit the notes while another user has the same record open if the notes are not part of the source that populates the other fields.

    * However, the notes would not be refreshed for a concurrent user viewing the main record when those notes are changed by someone else unless something about the process could ensure their notes view is requeried before providing the means to edit them. Of course, if I'm editing the notes and you attempt to do so at the same time, you're back to square one.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Memo or long text field join?
    By Brianmullen8 in forum Queries
    Replies: 8
    Last Post: 02-12-2018, 04:20 PM
  2. Long Text field in report
    By QuyitLady in forum Reports
    Replies: 11
    Last Post: 01-24-2018, 01:00 PM
  3. how much text in long integer field?
    By accessmatt in forum Database Design
    Replies: 10
    Last Post: 12-22-2014, 03:54 PM
  4. Replies: 13
    Last Post: 01-11-2012, 09:44 PM
  5. Ribbons XML code to long for one text field
    By sstrauss87 in forum Access
    Replies: 3
    Last Post: 12-22-2011, 03:46 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