H
Heinrich Wessel
I'm working on an employee database, and need to have it send an e-
mail if certain items change (name & address). The e-mail part works,
but checking to see what in the record changed using AfterUpdate
doesn't seem to.
Private Sub Form_AfterUpdate()
If "Me!Address" <> "Tables![Addresses]![Address]" Then
Dim intAnswer As Integer
intAnswer = MsgBox("You have made changes this employees personnel
file. Would you like to send changes to the appropriate parties?",
vbQuestion + vbYesNo, "Changes Detected")
If intAnswer = vbYes Then
'code here for e-mail
End If
End If
End Sub
Basically, my If statements always returns true, and always gives me
the message box regardless of which fields changed. I'm guessing its
a problem with the logic, and unfortunalty I am new to VBA, so any
help would be appreciated.
mail if certain items change (name & address). The e-mail part works,
but checking to see what in the record changed using AfterUpdate
doesn't seem to.
Private Sub Form_AfterUpdate()
If "Me!Address" <> "Tables![Addresses]![Address]" Then
Dim intAnswer As Integer
intAnswer = MsgBox("You have made changes this employees personnel
file. Would you like to send changes to the appropriate parties?",
vbQuestion + vbYesNo, "Changes Detected")
If intAnswer = vbYes Then
'code here for e-mail
End If
End If
End Sub
Basically, my If statements always returns true, and always gives me
the message box regardless of which fields changed. I'm guessing its
a problem with the logic, and unfortunalty I am new to VBA, so any
help would be appreciated.