parse data with space as delimiter in table with query

G

Guest

I have created Kanban cards with the part number and card number in the
barcode. I need to break down the data without going to excel and reloading
back to access. I used a space in the format to accomplish this. Problem is
the part numbers are alpha numeric and different lenghts which don't allow me
to break down the beginning, mid, and ending. I need to be able to break down
like excel does in text to columns.
 
J

John Vinson

I have created Kanban cards with the part number and card number in the
barcode. I need to break down the data without going to excel and reloading
back to access. I used a space in the format to accomplish this. Problem is
the part numbers are alpha numeric and different lenghts which don't allow me
to break down the beginning, mid, and ending. I need to be able to break down
like excel does in text to columns.

Try:

LeftPart: Left([fieldname], InStr([fieldname], " ") - 1)
RightPart: Mid([fieldname], InStr([fieldname], " ") + 1)

InStr finds the position of the blank in the field; Left and Mid
extract the substrings to the left and to the right of the blank,
respectively.

John W. Vinson[MVP]
 

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