Dim ctl As Control
Dim strMsg As String
Dim strUpdated As String
strUpdated = ""
If ctl.OldValue <> Me.EnteredBy Then
strUpdated = Me.EnteredBy.Name & vbCrLf
End If
If ctl.OldValue <> Me.DateEntered Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf
End If
If ctl.OldValue <> Me.Approved Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf
End If
If ctl.OldValue <> Me.CycleMonth Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf
End If
If ctl.OldValue <> Me.DateReviewed Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf
End If
If ctl.OldValue <> Me.ReportType Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf
End If
If ctl.OldValue <> Me.MainSection Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf
End If
If ctl.OldValue <> Me.TopicSection Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf
End If
If ctl.OldValue <> Me.ReviewerType Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf
End If
If ctl.OldValue <> Me.Reviewer Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf
End If
If ctl.OldValue <> Me.ReviewerReportArea Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf
End If
If ctl.OldValue <> Me.Individual Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf
End If
If ctl.OldValue <> Me.Team Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf & vbCrLf & Me.Team.Name & vbCrLf
End If
If ctl.OldValue <> Me.txtCount Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf & vbCrLf & Me.Team.Name & vbCrLf & Me.txtCount.Name & vbCrLf
End If
If ctl.OldValue <> Me.Repeat Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf & vbCrLf & Me.Team.Name & vbCrLf & Me.txtCount.Name & vbCrLf & Me.Repeat.Name & vbCrLf
End If
If ctl.OldValue <> Me.Exception Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf & vbCrLf & Me.Team.Name & vbCrLf & Me.txtCount.Name & vbCrLf & Me.Repeat.Name & vbCrLf & Me.Exception.Name & vbCrLf
End If
If ctl.OldValue <> Me.L1 Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf & vbCrLf & Me.Team.Name & vbCrLf & Me.txtCount.Name & vbCrLf & Me.Repeat.Name & vbCrLf & Me.Exception.Name & vbCrLf & Me.L1.Name & vbCrLf
End If
If ctl.OldValue <> Me.L2 Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf & vbCrLf & Me.Team.Name & vbCrLf & Me.txtCount.Name & vbCrLf & Me.Repeat.Name & vbCrLf & Me.Exception.Name & vbCrLf & Me.L1.Name & vbCrLf & Me.L2.Name & vbCrLf
End If
If ctl.OldValue <> Me.L3 Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf & vbCrLf & Me.Team.Name & vbCrLf & Me.txtCount.Name & vbCrLf & Me.Repeat.Name & vbCrLf & Me.Exception.Name & vbCrLf & Me.L1.Name & vbCrLf & Me.L2.Name & vbCrLf & Me.L3.Name & vbCrLf
End If
If ctl.OldValue <> Me.txtOther Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf & vbCrLf & Me.Team.Name & vbCrLf & Me.txtCount.Name & vbCrLf & Me.Repeat.Name & vbCrLf & Me.Exception.Name & vbCrLf & Me.L1.Name & vbCrLf & Me.L2.Name & vbCrLf & Me.L3.Name & vbCrLf & Me.txtOther.Name & vbCrLf
End If
If ctl.OldValue <> Me.PriorityLevel Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf & vbCrLf & Me.Team.Name & vbCrLf & Me.txtCount.Name & vbCrLf & Me.Repeat.Name & vbCrLf & Me.Exception.Name & vbCrLf & Me.L1.Name & vbCrLf & Me.L2.Name & vbCrLf & Me.L3.Name & vbCrLf & Me.txtOther.Name & vbCrLf & Me.PriorityLevel.Name & vbCrLf
End If
If ctl.OldValue <> Me.Notes Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf & vbCrLf & Me.Team.Name & vbCrLf & Me.txtCount.Name & vbCrLf & Me.Repeat.Name & vbCrLf & Me.Exception.Name & vbCrLf & Me.L1.Name & vbCrLf & Me.L2.Name & vbCrLf & Me.L3.Name & vbCrLf & Me.txtOther.Name & vbCrLf & Me.PriorityLevel.Name & vbCrLf & Me.Notes.Name & vbCrLf
End If
If ctl.OldValue <> Me.Outliers Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf & vbCrLf & Me.Team.Name & vbCrLf & Me.txtCount.Name & vbCrLf & Me.Repeat.Name & vbCrLf & Me.Exception.Name & vbCrLf & Me.L1.Name & vbCrLf & Me.L2.Name & vbCrLf & Me.L3.Name & vbCrLf & Me.txtOther.Name & vbCrLf & Me.PriorityLevel.Name & vbCrLf & Me.Notes.Name & vbCrLf & Me.Outliers.Name & vbCrLf
End If
If ctl.OldValue <> Me.txtOther2 Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf & vbCrLf & Me.Team.Name & vbCrLf & Me.txtCount.Name & vbCrLf & Me.Repeat.Name & vbCrLf & Me.Exception.Name & vbCrLf & Me.L1.Name & vbCrLf & Me.L2.Name & vbCrLf & Me.L3.Name & vbCrLf & Me.txtOther.Name & vbCrLf & Me.PriorityLevel.Name & vbCrLf & Me.Notes.Name & vbCrLf & Me.Outliers.Name & vbCrLf & Me.txtOther2.Name & vbCrLf
End If
If ctl.OldValue <> Me.txtHyperlink Then
strUpdated = strUpdated & Me.DateEntered.Name & vbCrLf & Me.Approved.Name & vbCrLf & Me.CycleMonth.Name & vbCrLf & Me.DateReviewed.Name & vbCrLf & Me.ReportType.Name & vbCrLf & Me.MainSection.Name & vbCrLf & Me.TopicSection.Name & vbCrLf & Me.ReviewerType.Name & vbCrLf & Me.Reviewer.Name & vbCrLf & Me.ReviewerReportArea.Name & vbCrLf & Me.Individual.Name & vbCrLf & vbCrLf & Me.Team.Name & vbCrLf & Me.txtCount.Name & vbCrLf & Me.Repeat.Name & vbCrLf & Me.Exception.Name & vbCrLf & Me.L1.Name & vbCrLf & Me.L2.Name & vbCrLf & Me.L3.Name & vbCrLf & Me.txtOther.Name & vbCrLf & Me.PriorityLevel.Name & vbCrLf & Me.Notes.Name & vbCrLf & Me.Outliers.Name & vbCrLf & Me.txtOther2.Name & vbCrLf & Me.txtHyperlink.Name & vbCrLf
End If
strMsg = ""
For Each ctl In Me.Controls
With ctl
Select Case .ControlType
Case acTextBox, acComboBox, acCheckBox
If InStr(ctl.Tag, "Compare") > 0 Then
'If ctl.OldValue <> ctl.Value Then strMsg = "- " & ctl.Controls(0).Name & vbCrLf
If ctl.OldValue <> ctl.Value Then strMsg = "- " & strUpdated & vbCrLf
End If
End Select
End With
Next
If strMsg <> "" Then MsgBox "You updated:" & vbCrLf & vbCrLf & strMsg, vbInformation, "SUCCESS!"
exitHere:
Exit Sub
errHandler:
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume exitHere
End Sub