Warn user2 if user1 on requested record

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EManning
    New Member
    • Sep 2008
    • 13

    #1

    Warn user2 if user1 on requested record

    Using Access 2003, linked tables to SQL Server, and using a form that's mostly bound. I need a way to tell if user1 is on the record when user2 tries to open the same record, w/o waiting for the user1 to save the record first. I don't want to wait until the write-conflict error occurs. I want to pre-warn user2 that user1 is on the record. The only way I can think of is by adding a flag to the record and setting it to true when user1 opens the record. If user2 tries to open it, the flag is checked for true, then a message would be displayed to them
    that user1 is on the record. When user1 saves the record, then the
    flag is set to false.

    Is this a good way to do this? Thanks for any help or advice.
  • DonRayner
    Recognized Expert Contributor
    • Sep 2008
    • 489

    #2
    Not sure if this works on SQL DB or not but try Tools-Options-Advanced

    Under "Default Record Locking" set for Edited Records and also make sure that the "Open Databases using record level locking" checkbox is checked.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32669

      #3
      That's the only way i can think where you can know WHICH other user has the record locked.

      Otherwise, any time you go to a record, if you attempt to .Edit it with On Error Resume Next set, you can check Err to see if it failed and how.

      If it didn't then immediately .Cancel the update.

      Comment

      • EManning
        New Member
        • Sep 2008
        • 13

        #4
        Thanks for your reply. Those settings won't work in a SQL environment. This is weird. I'm not finding anything in newsgroups or other sites where people have had this issue. I can't believe I'm the only one with this problem!

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32669

          #5
          I'm sorry I can't be more help. I'm afraid I just don't play much in that area :(

          Comment

          • EManning
            New Member
            • Sep 2008
            • 13

            #6
            Thanks for your reply, NeoPa.

            Comment

            Working...