Trying to do a simple VBA script to look at a field and if that field contains 99 in the middle then show another field. I can get a normal statement to work i.e. field2 = "5D992" but not a contains statement using wild cards (see script below). I think it might be just my syntax is wrong, any ideas anyone??
Sub OnFormat
IF rpt.field3.Text.contains "*99*" THEN
rpt.field2.visible = false
Else
rpt.field2.Visible = true
End If
End Sub
Thanks for any suggestions.