idk if u means this code..
in the button for search macros on click = Search.ClearFilter
In table the ID is auto number, First Name, Last name is short text.
Code:
if [CurrentProject].[IsTrusted] And ([Form]![SearchBox] Is Null Or [Form]![SearchBox]="")
Set value -----> Here am getting an exclamation mark.. with unsafe action
item = [SearchBox].[Text]
Expression = ""
setTempVar
Name strFilter
Expression = "([ID] Like ""*" & [TempVars]![strSearch] & "*"")"
setTempVar
Name strFilter
Expression = [TempVars]![strFilter] & " OR ([First Name] Like ""*" & [TempVars]![strSearch] & "*"")"
setTempVar
Name strFilter
Expression = [TempVars]![strFilter] & " OR ([Last Name] Like ""*" & [TempVars]![strSearch] & "*"")"
I tend to use ' for strings. I do not have many that will already have a ' in the control/variable.
Code:
Expression = "[ID] Like "'*" & [TempVars]![strSearch] & "*'"
Otherwise I think it is three " or use CHR(34) ?
Normally I would say Debug.Print the variable, but as you are using macroes, not sure how you can do that. perhaps use Echo in the macro, or even MSGBOX ?