G
gaba
Hi Everybody,
Before posting my question I've read prior answers on "write conflict"
"timestamp" "Parent"... I've tried all of them and nothing is working. Maybe
somebody can see what I'm doing wrong, or what I'm not doing...
Parent form is based on table "Companies".
Subform has a check box with "MainContactValue", on click change the value
on Parent form (MainContact). Everything is working but each time the dialog
box shows up with the "Write Conflict".
I've added a timestamp field on the tables, each has a key. Forms' links are
working... the only thing is I have a field on the main table (datetime) that
shows the date that was updated (LastActivity). I even try this field with
time.
On the parent form I have:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Forms![frmDECompanies_All]!LastActivity = Date$
End Sub
On the Sub Form:
Private Sub MainContactValue_Click()
On Error GoTo Err_MainContactValue_Click
If (Me.MainContactValue = True) Then
Me.Parent!MainContact = Me.FName & " " & Me.LName
Else
Me.Parent!MainContact = Null
End If
'If Me.Dirty = True Then Me.Dirty = False
'DoCmd.Save acForm, "frmDECompanies_All"
Exit_MainContactValue_Click:
Exit Sub
Err_MainContactValue_Click:
MsgBox Err.Description
Resume Exit_MainContactValue_Click
End Sub
I've tried "Dirty", "Requery", "Save Record", you named..
Any Help would be greatly appreciated. Maybe I'm trying so hard I'm mixing
things up.
Before posting my question I've read prior answers on "write conflict"
"timestamp" "Parent"... I've tried all of them and nothing is working. Maybe
somebody can see what I'm doing wrong, or what I'm not doing...
Parent form is based on table "Companies".
Subform has a check box with "MainContactValue", on click change the value
on Parent form (MainContact). Everything is working but each time the dialog
box shows up with the "Write Conflict".
I've added a timestamp field on the tables, each has a key. Forms' links are
working... the only thing is I have a field on the main table (datetime) that
shows the date that was updated (LastActivity). I even try this field with
time.
On the parent form I have:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Forms![frmDECompanies_All]!LastActivity = Date$
End Sub
On the Sub Form:
Private Sub MainContactValue_Click()
On Error GoTo Err_MainContactValue_Click
If (Me.MainContactValue = True) Then
Me.Parent!MainContact = Me.FName & " " & Me.LName
Else
Me.Parent!MainContact = Null
End If
'If Me.Dirty = True Then Me.Dirty = False
'DoCmd.Save acForm, "frmDECompanies_All"
Exit_MainContactValue_Click:
Exit Sub
Err_MainContactValue_Click:
MsgBox Err.Description
Resume Exit_MainContactValue_Click
End Sub
I've tried "Dirty", "Requery", "Save Record", you named..
Any Help would be greatly appreciated. Maybe I'm trying so hard I'm mixing
things up.