Which event precedes "another user has changed record" error in Access 2007? (1 Viewer)

bcmarshall

Registered User.
Local time
Today, 11:28
Joined
Jul 17, 2010
Messages
92
Which event precedes "another user has changed record" error in Access 2007?

I have written a live queue for an insurance company. When a user inputs info on a web form it is immediately placed in a staging table in Access 2007 housed on SQL Server 2008. The count of unassigned records in the queue is displayed on all screens and updated every 5 seconds. A double-click on one field of the queue form causes an append query to run to append the chosen record of web info to our main data table and it then opens the already fully populated record on screen for attention.

The overall system works perfectly, but the problem I'm having is that it's not infrequent that two people try to double-click the same record at approximately the same time, causing duplicates and confusion. Using record locks I can get the standard clipboard error, "Another user has changed the data..." to occur, which accomplishes the task of halting the second record writing process, but I am not satisfied to leave it that way. Is there a particular property that evaluates to true that I can use to detect the potential for the error before it happens, so that I can stop the actions before writing to the record and causing the actual error?

I thought that the Dirty property might work, but it seems to be only for the form you're writing on at the time, and not for the database state. DataChange evaluates to a string, and while I can use a Len() operation to detect if the string is greater than zero length and get a True-False result, that doesn't seem to work for the underlying table, but instead only for the form on screen.

The very first operation is to change the text in [QuoteStatus] from "Unassigned" to "Assigned".

I essentially would like to determine in advance that if I proceed with the write operation the error will occur and be able to use that to stop all activity and just pop a message saying the record is already assigned to someone else.

I hope that's clear enough.

As always, all help is greatly appreciated.
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:28
Joined
Jan 23, 2006
Messages
15,403
Re: Which event precedes "another user has changed record" error in Access 2007?

I have had situations where a number of verifier/editors were working on a number of records needing approval. This was LAN based, not web interface. Our approach was to have an Admin routine look up the number of records needing approval, and knowing the number of verifier/editors (approval needed/number of verifier/editors) [let's just assume this division gave us 90], we ran an Admin process to assign 90 records to each verifier/editor in turn.
The Admin process set an OK To Edit flag. The verifier/editors could then look at their list of records and edit/approve as required.

The Admin routine would check at various times (typically start of day) and "pre assign records to operators. So there was no "competition" for assignment.

Just a thought - it worked for us.
It may be adaptable to your situation.

Good luck.
 

bcmarshall

Registered User.
Local time
Today, 11:28
Joined
Jul 17, 2010
Messages
92
Re: Which event precedes "another user has changed record" error in Access 2007?

Thanks. I don't think that is applicable to what I'm doing, unfortunately. The queue staging table is fed from the web interface, but once there, the transfer to the main data table is controlled by a user double-click. I have a unique WebID number that goes along with each record, but I don't see how to harness that. The record count is dynamic, changing all the time.

I was hoping there was some positive indication that the record has been changed that I could harness to stop any attempt to write to the same record again.
 

Users who are viewing this thread

Top Bottom