mistyinca1970
Member
- Local time
- Today, 15:27
- Joined
- Mar 17, 2021
- Messages
- 117
I have discovered that the "*" does not seem to work as a wildcard in my code. I want the graphic to show up for records whose Company begins with "EMD". What is the correct way to express wildcards in vb coding? Thank you,
Code:
Private Sub Form_Current()
If (txtCompany = "EMD*") Then
DoCmd.SetProperty "imgEMD", acPropertyVisible, "-1"
End If
If (txtCompany <> "EMD*") Then
DoCmd.SetProperty "imgEMD", acPropertyVisible, "0"
End If
End Sub