Quick sort using Access - parsing data - need some help
Posted on 2012-09-21
Running Access 2000 on a pc running Windows XP pro
I just want to do a quick sort of data. I am importing one data column from Excel. An example of the data in the field is:
John Peters, programmer
I imported the data into an Access table called tblImport. It has one field called [Field1].
I want to separate first name from last name. I did this in a query using the following query:
Expr_FirstNamePos: InStr(1,[Field1]," ")
Yes, it’s crude but it works.
I want to sort Exp_FirstName and Expr_LastName in ascending order. When I try to do this Access presents a dialog box asking me to enter a parameter value. So obviously Access is confused.
1.) Do I really have to write VB code to do this? I just want to do a quick sort, not a fancy solution
2.) Is there some way to do this in Excel without using Access? I can’t seem to use Instr in an Excel cell without writing VB Code.
Thank you for your help.