Left-Right Functions?

  • Thread starter Thread starter dataH
  • Start date Start date
D

dataH

Question for Access 2007

I have a field containing both numbers and text, separated by a common dash
(-):

Numbers Example: 57982-416; 241-45638; 113674588-1

Text Example: abcdefg-bbbk; jkte-ljpui

or both: 125879-asgtyu

I would like a way to separate the contents left of the dash in a new field
and the contents being the right of the dash into a separte field.


Thanks and Best regards

dataH
 
Try a query.

Add a new field something like:

NewField: Left([YourField],Instr([YourField],"-")-1)

Add another new field like:

AnotherNewField: Mid([YourField],Instr([YourField],"-")+1)

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top