T
TotallyConfused
Hi can someone please help with this? Trying to understand why this is not
running? I have one other control on my form with the same code and it runs
just fine. When I make a change on the form it will ask for a parameter and
then debugs with the following highlighted. Thank you for any help you can
provide.
DoCmd.RunSQL "UPDATE [Tracking] SET [Tracking].[Contactperson] = '" & _
Forms![frm Provider Tracking].[Contactperson] & "' WHERE
([Tracking].[ID])= " & _
Forms![frmPRTrckg].[ID]
Private Sub Contactperson_AfterUpdate()
If MsgBox("Propagate Contactperson change?", vbYesNo) = vbYes Then
'MsgBox ("yes: " & "UPDATE [Tracking] SET
[Tracking].[Contactperson] = '" & _
Me.PRVDR_PH & "' WHERE ([Tracking].[ID])= " & Me.PRVDR_ID)
'run a query to update
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE [Tracking] SET [Tracking].[Contactperson] = '"
& _
Forms![frm Provider Tracking].[Contactperson] & "' WHERE
([Tracking].[ID])= " & _
Forms![frmPRTrckg].[ID]
DoCmd.SetWarnings True
Else
'do nothing
End If
End Sub
running? I have one other control on my form with the same code and it runs
just fine. When I make a change on the form it will ask for a parameter and
then debugs with the following highlighted. Thank you for any help you can
provide.
DoCmd.RunSQL "UPDATE [Tracking] SET [Tracking].[Contactperson] = '" & _
Forms![frm Provider Tracking].[Contactperson] & "' WHERE
([Tracking].[ID])= " & _
Forms![frmPRTrckg].[ID]
Private Sub Contactperson_AfterUpdate()
If MsgBox("Propagate Contactperson change?", vbYesNo) = vbYes Then
'MsgBox ("yes: " & "UPDATE [Tracking] SET
[Tracking].[Contactperson] = '" & _
Me.PRVDR_PH & "' WHERE ([Tracking].[ID])= " & Me.PRVDR_ID)
'run a query to update
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE [Tracking] SET [Tracking].[Contactperson] = '"
& _
Forms![frm Provider Tracking].[Contactperson] & "' WHERE
([Tracking].[ID])= " & _
Forms![frmPRTrckg].[ID]
DoCmd.SetWarnings True
Else
'do nothing
End If
End Sub