Write conflict - form/subform : Access 2000 & SQL Server 7.0 (1 Viewer)

B

bansalh

Guest
I have problem and was hoping the someone could help me with it - I have a main form with a number subforms most of these are views of the same table. When I insert a new record into the table and the focus move from the main form to the one of the subforms I get a "write conflict" error ( I'm the only one using the database).
To fix the problem I created a procedure to trap the error using the main forms "On Error" event property. The procedure looks as follows:

Private Sub Form_Error(DataErr As Integer, Response As Integer)
If DataErr = 7787 Then
Response = acDataErrAdded
End If
End Sub

Which stops the "write conflict" pop-up from appearing but does not save the information and allow me to carry on, i.e. all the fields I just edited on main form are reset - I was led to believe that setting the Response to acDataErrAdded would fix this problem but for some reason it does not seem to work. If anyone has any ideas why this or how to fix this sort of problem please let me know.

BTW: My table is linked to a number of other tables, I have recreated all of the links and checked that they are ok, I have also made sure that all fields that are defined "bit" have default values ("0"). The database was upsized from Access 2000 to SLQ 7.0 using the upsizing wizard.
 

Carol

Registered User.
Local time
Today, 11:45
Joined
Jan 15, 2000
Messages
280
After entering in information in the main form and before moving to the subform, make sure that you save the data and requery before continuing on to a subform.
 
B

bansalh

Guest
'Write conflict - form/subform : Access 2000 & SQL Server 7.0

I'd thought of doing that - only problem is that I have 7 subforms,and movement from subform to subform can be random, as can movement mainform to subform. So not really something I want to do especially as the DB will eventually have multiple users who may be on remote network.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 06:45
Joined
Feb 19, 2002
Messages
43,257
You are running some code in a form event that is attempting to update the current record bound to the form. This can happen if you run an update query or use the update method to update the current record outside the control of the form. You should not be attempting to update a bound record by using code in a form event.
 

Users who are viewing this thread

Top Bottom