Write Conflict on same form

M

mistux

I am getting the following error: Write Conflict--"This record has bee
changed by another user since you started editing it...."

I think I know why, but I am sot sure what to do about it.

I have a main form with a sub form, each is based on a stored procedur
with only one table in it (not the same table) and only one parameter.

When I make a change to anythign in the subform I update the mai
form's "last changed date" field then when I hit save on the main for
I get the error.

How do I resolve this?

I am using Access 2002 SP 3 with an .ADP not .MDB and MS SQL Serve
2000
 
S

Sylvain Lafontaine

Access uses optimistic locking so this kind of things happens sometimes.
The best way to resolve this is to know the exact steps used by Access when
it updates the database, so you should take a look with the SQL-Server
Profiler to see what's happening.

Are you using VBA code to make your changes?
 
R

Robert Morley

One way of resolving it might be to put a hidden text box on the form, then
make sure you change the date by always referencing the value of the textbox
(not its underlying field). You should do this in the BeforeUpdate
procedure, not the AfterUpdate. I *think* that works. Not on my laptop
right now to try it, though.


Rob
 
A

aaron.kempf

have you tried just adding 'nolock' query hints when you display data
that isn't editiable?
or change .allowupdates = false for the subform; etc?

-Aaron
 
S

steel

To solve my write conflicts I use

DoCmd.Runcommand accmdsaverecord

You just have to work out the best location in the code to execute it (that
was my biggest problem)

Hope this helps.
 
K

Ken Mitchell

Another possibility is if you have a "bit" data field in SQL Server. If so,
then set a default value for the bit field, either 0 or -1 for No and Yes.
Then run an update query to populate values for all of the records.

Access has difficulty with "nulls" in bit fields in SQL.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

sqlite-odbc write conflict 2
Write Conflict 3
Embed the same Excel multiple times 0
Write Conflict in Form Save 3
Write conflict Error message 2
Write Conflict with Subform 4
write conflict 4
Write Conflict 7

Top