G
Guest
I have the following macro attached to a textbox used to find records in a
database. It's used as a condition to display a msgbox if there are no
records found. The condition reads:
[Last]<>([txtSearch] OR "*" &[txtSearch] OR "*" &[txtSearch]&"*" OR
[txtSearch]& "*")
The original condition simply read [Last]<>[txtSearch], but its addition
seemed to disable the use of the wildcard character, so I added the asterisks
to the macro. Now the wildcard character is working, but it produces a "Type
Mismatch" msgbox whenever it's used. This isn't causing any serious
problems, but I'm wondering how to get rid of it or if the statement could be
written better to enable wildcards.
database. It's used as a condition to display a msgbox if there are no
records found. The condition reads:
[Last]<>([txtSearch] OR "*" &[txtSearch] OR "*" &[txtSearch]&"*" OR
[txtSearch]& "*")
The original condition simply read [Last]<>[txtSearch], but its addition
seemed to disable the use of the wildcard character, so I added the asterisks
to the macro. Now the wildcard character is working, but it produces a "Type
Mismatch" msgbox whenever it's used. This isn't causing any serious
problems, but I'm wondering how to get rid of it or if the statement could be
written better to enable wildcards.