T
Ted
using a2k, i am getting this 'Compile error'.
here's the vba code:
Private Sub Form_AfterUpdate()
If Me.Last_Name <> Me.Last_Name.OldValue Or Me.First_Name <>
Me.First_Name.OldValue Or _
Me.MR_Number <> Me.MR_Number.OldValue Or Me.SequenceNum <>
Me.SequenceNum.OldValue Or _
Me.IRB_Number <> Me.IRB_Number.OldValue Or Me.[Sponsor ID Nbr] <>
Me.[Sponsor ID Nbr].OldValue Or _
Me.OffStudyDate <> Me.OffStudyDate.OldValue Or Me.Campus <>
Me.Campus.OldValue And (Me.Outcome_ = 5 Or _
Me.Outcome_ = 6 Or Me.Outcome_ = 7) Then
DoCmd.RunMacro "Update Screening Log (Edit Only) Record"
End If
End Sub
i'm not totally new to this, however what strikes me as kind of odd is that
the variables as i call them following the 'Me' were all culled from the
lookup table which vba thoughtfully provided one i entered the dot ('.')
after the 'Me' word.
i've tried debugging this thing and rearranging the order of the data
elements to see if that made a difference and using the code above,
IRN_Number was highlighted in reverse video when the messae in the subject
got displayed.
using the same (but re-arranged) vba code below, it happens over the
Me.SequenceNum.
Private Sub Form_AfterUpdate()
If Me.Last_Name <> Me.Last_Name.OldValue Or Me.First_Name <>
Me.First_Name.OldValue Or _
Me.MR_Number <> Me.MR_Number.OldValue Or Me.SequenceNum <>
Me.SequenceNum.OldValue Or _
Me.[Sponsor ID Nbr] <> Me.[Sponsor ID Nbr].OldValue Or Me.IRB_Number <>
Me.IRB_Number.OldValue Or _
Me.OffStudyDate <> Me.OffStudyDate.OldValue Or Me.Campus <>
Me.Campus.OldValue And (Me.Outcome_ = 5 Or _
Me.Outcome_ = 6 Or Me.Outcome_ = 7) Then
DoCmd.RunMacro "Update Screening Log (Edit Only) Record"
End If
End Sub
can anybody explain what i'm doing rong?!
here's the vba code:
Private Sub Form_AfterUpdate()
If Me.Last_Name <> Me.Last_Name.OldValue Or Me.First_Name <>
Me.First_Name.OldValue Or _
Me.MR_Number <> Me.MR_Number.OldValue Or Me.SequenceNum <>
Me.SequenceNum.OldValue Or _
Me.IRB_Number <> Me.IRB_Number.OldValue Or Me.[Sponsor ID Nbr] <>
Me.[Sponsor ID Nbr].OldValue Or _
Me.OffStudyDate <> Me.OffStudyDate.OldValue Or Me.Campus <>
Me.Campus.OldValue And (Me.Outcome_ = 5 Or _
Me.Outcome_ = 6 Or Me.Outcome_ = 7) Then
DoCmd.RunMacro "Update Screening Log (Edit Only) Record"
End If
End Sub
i'm not totally new to this, however what strikes me as kind of odd is that
the variables as i call them following the 'Me' were all culled from the
lookup table which vba thoughtfully provided one i entered the dot ('.')
after the 'Me' word.
i've tried debugging this thing and rearranging the order of the data
elements to see if that made a difference and using the code above,
IRN_Number was highlighted in reverse video when the messae in the subject
got displayed.
using the same (but re-arranged) vba code below, it happens over the
Me.SequenceNum.
Private Sub Form_AfterUpdate()
If Me.Last_Name <> Me.Last_Name.OldValue Or Me.First_Name <>
Me.First_Name.OldValue Or _
Me.MR_Number <> Me.MR_Number.OldValue Or Me.SequenceNum <>
Me.SequenceNum.OldValue Or _
Me.[Sponsor ID Nbr] <> Me.[Sponsor ID Nbr].OldValue Or Me.IRB_Number <>
Me.IRB_Number.OldValue Or _
Me.OffStudyDate <> Me.OffStudyDate.OldValue Or Me.Campus <>
Me.Campus.OldValue And (Me.Outcome_ = 5 Or _
Me.Outcome_ = 6 Or Me.Outcome_ = 7) Then
DoCmd.RunMacro "Update Screening Log (Edit Only) Record"
End If
End Sub
can anybody explain what i'm doing rong?!