Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding ", " in a field using an expression 1

Status
Not open for further replies.

jimdevon

IS-IT--Management
Oct 14, 2002
25
US
I cannot get this to work. IIF([wholenm] = "," , 1, 2)
also tried IIf([wholenm]= *","*, 1, 2) no luck always get "2".
The field wholenm has this format (Smith, John), problem is some people at this company just entered (John Smith). I need to use instring and lenght to pull first name regardless of which method they used. Thanks in advance. Jimdevon
 
what you are checking for is if the name = ",", don't you really want to see if it's in wholename?


iif(InStr(',', [wholename]), 1, 2)

leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top