Parent Update from Subform in ADP Causes Write Conflict

R

Robert Robichaud

When the Quantity field in the subform is changed, the Quantity_AfterUpdate
has the following line:

Me.Parent!QuantityChanged = True

When I click on the form's tab to change the focus to the Parent, the Write
Conflict message appears.

QuantityChanged is set up in SQL Server as:

Data Type: bit
Length: 1
Allow Nulls: NOT CHECKED
Default Value: 0

Any ideas on what's happening or where I should be looking? Any comments
are appreciated.
 
G

giorgio rancati

Hi, Robert

put the *Me.Parent!QuantityChanged = True* in Form_AfterUpdate event.

example
----
Option Compare Database
Option Explicit
Dim CheckQuantityChanged As Boolean

Private Sub Form_AfterUpdate()

If CheckQuantityChanged = True Then
Me.Parent!QuantityChanged = True
End If

CheckQuantityChanged = False

End Sub

Private Sub Quantity_AfterUpdate()

CheckQuantityChanged = True

End Sub
 
R

Robert Robichaud

Giorgio,

It worked! Should have posted this last week instead of pulling my hair
out!

Once again, Thank You!

Cheers,

Robert
 

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

Top