G
Guest
I would like the code below to do this:
If the HSILFinalLetter field has a date (i.e. is not null)
and the HSILLetterResponse field (data type is text) doesn't have the string
"preg*" in it,
Then make the value of the HSILSurgicalDx field = 8
but if the HSILLetterResponse field has "preg*" in it somewhere, then leave
the HSILSurgicalDx field value as Null
After I tested the following code, the problem is that the HSILSurgicalDx
has an 8 regardless of the HSILLetterReponse field having "Preg*" or not.
How do I accomplish what I'd like to do with this code? Let me know if you
need any clarification about my info.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not IsNull(HSILFinalLetter) = True Then
If (HSILLetterResponse <> "preg*") Then
HSILSurgicalDx.Value = 8
Else
HSILSurgicalDx.Value = Null
End If
End If
End Sub
If the HSILFinalLetter field has a date (i.e. is not null)
and the HSILLetterResponse field (data type is text) doesn't have the string
"preg*" in it,
Then make the value of the HSILSurgicalDx field = 8
but if the HSILLetterResponse field has "preg*" in it somewhere, then leave
the HSILSurgicalDx field value as Null
After I tested the following code, the problem is that the HSILSurgicalDx
has an 8 regardless of the HSILLetterReponse field having "Preg*" or not.
How do I accomplish what I'd like to do with this code? Let me know if you
need any clarification about my info.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not IsNull(HSILFinalLetter) = True Then
If (HSILLetterResponse <> "preg*") Then
HSILSurgicalDx.Value = 8
Else
HSILSurgicalDx.Value = Null
End If
End If
End Sub