extracting data

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

Hi

i have a field which contains a folder name followed by a '/' follweed by a
filename. Both the folder and file names are variable lengths
I need to split the data into two fields so that I have the folder and the
name in two fields

Is it possible to establish the position of the '/' and then extract the
data either side of it

thanks
A
 
Do you mean a backward slash \ separating folders and file name?

Check Access VB Help on the InStr() function ...
 
Hi Thanks for your response

i have been using the following syntax in trying to extract from the field
Name, all the characters up to and including the backward slash

Left([name],Len(InStr(1,[name],"\")+1))

In my nievity I am assuming that this would extract from field Name,
starting at the left, the lebgth of whatever the Inst retruned + 1

Clearly I am wrong !!

A
 
Try this --
Left([name],InStr([name],"\")-1)

and
Right([name],Len([name]) - InStr([name],"\"))

Alex said:
Hi Thanks for your response

i have been using the following syntax in trying to extract from the field
Name, all the characters up to and including the backward slash

Left([name],Len(InStr(1,[name],"\")+1))

In my nievity I am assuming that this would extract from field Name,
starting at the left, the lebgth of whatever the Inst retruned + 1

Clearly I am wrong !!

A


Van T. Dinh said:
Do you mean a backward slash \ separating folders and file name?

Check Access VB Help on the InStr() function ...
 

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

Back
Top