Sort and Concentate text

G

Guest

I want to have a query field combine two other fields to be one text but
first sort alphabeticly.

So:

[ Name A] and [Name B] becomes [Name A Name B] but alway in Alphabetic order.

Always "AdamsJones" never "JonesAdams"

I was trying "Max([NameA],NameB]) & Min([NameA],[NameB])" but access
aparently does not suport this type statment because I get an error.
 
J

John Nurick

Hi David,

Use the StrComp() function, something like this:

IIf(StrComp(X, Y,0)<0, X & Y, Y & X)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top