473,385 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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.
Sep 26 '08 #1
5 1301
DonRayner
489 Expert 256MB
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.
Sep 26 '08 #2
NeoPa
32,556 Expert Mod 16PB
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.
Sep 26 '08 #3
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!
Sep 26 '08 #4
NeoPa
32,556 Expert Mod 16PB
I'm sorry I can't be more help. I'm afraid I just don't play much in that area :(
Sep 26 '08 #5
Thanks for your reply, NeoPa.
Sep 26 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: JT | last post by:
is there a way to warn the user before their session expires??
2
by: CJM | last post by:
I'm running a stored procedure that inserts a record into a table then returns the Identity field value. I've done this kind of thing plenty of times in the past, but I'm obviously doing something...
0
by: Roger | last post by:
I've got this small vba code Public Sub sendmail() Dim osession As Object Set osession = CreateObject("MAPI.Session") osession.logon "npescan", "", False, True, 0, False ... read stuff......
3
by: James Armstrong | last post by:
Hi all, (warning - long post ahead) I have been tasked with designing a database for my company which will store trade information (it is a financial firm). It will need to export this info...
89
by: Cuthbert | last post by:
After compiling the source code with gcc v.4.1.1, I got a warning message: "/tmp/ccixzSIL.o: In function 'main';ex.c: (.text+0x9a): warning: the 'gets' function is dangerous and should not be...
2
by: indhu | last post by:
Hi its not working, i want only distinct record. here its repeated records coming. accdb = "SELECT DISTINCT sequence FROM scene WHERE sceneid = '" & myquery & "' " and when i select the...
2
by: tshad | last post by:
I have a page with Trace.Warns statements in my Page_Load and functions that it calls, but it doesn't seem to work in a class that is defined on the same page. I am writing this in C# I am...
5
by: TimSki | last post by:
Hi, This is very strange... I have a simple query using a recordset thus... set rsID = CreateObject("ADODB.recordset") searchPhrase = "SELECT blah...." rsID.Open searchPhrase, oConn
19
by: emanning | last post by:
Using Access 2003 and using a form that's mostly bound. I need a way to tell if user-1 is on the record when user-2 tries to open the same record, w/o waiting for the user-1 to save the record...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.