Code:
Switch(IsNull([CompanyName]),UCase(Left([LastName],3)),Not IsNull([CompanyName]),UCase(Left([CompanyName],3)))
I'm using a switch statement to decipher the left 3 characters of the Company name or Last Name, then upper casing them...
this is all very well, but every so often I'll have a company called:
AB C ltd, which would output as AB
and AB-C ltd would output as AB-
and so on, this 3 letter code runs through a count qry which will add a number to the end to create a customer reference code, so I also need it to ignore numbers,
is there a Left() code designed just for letters?