ExExperts:
I'm 100% confident there's a very simply solution to my problem. However, I'm always getting syntax errors when attempting to add a wildcard "*" (before and after) a string value.
For example, in my Access report, I may have the following three names in the last name column:
Smith
Smithfield
Henderson-Smith
When using =Sum(IIf([All_LastName]="Smith",1,0)) in my control, obviously a value of 1 is returned. Instead I want to add wild cards so that the SUM value returns 3.
I tried =Sum(IIf([All_LastName]=Like "*" & "Smith" & "*",1,0))... (as well as other variations) but apparently Access doesn't like the syntax.
What's the proper syntax so that the SUM returns a value of three?
Thank you,
EEH