SPLIT problem

chris-uk-lad

Registered User.
Local time
Today, 02:31
Joined
Jul 8, 2008
Messages
271
Hi, starting to pull my hair out over this one now, i really have no idea whats wrong with it. Im trying to use a split function (even a stand alone one which should 100% work) yet still come up with an error.

One ive taken from this board to test im not doing wrong and is standalone:

Code:
Dim varSplit As Variant
varSplit = Split("C:\Pictures\1.jpg", "\")

Yet i get "Compile Error: Sub or Function not defined"

why????? It highlights SPLIT after the error pops but everything required (as far as im aware) is contained in those 2 lines to make it work.
 
which access version are you using

split doesnt appear to be in A97, but is in later versions
 
97 ^^;

would explain something as i have it working on 2000.

Is there a work around?
 
you could emulate it by using the instr function. to split a string into sections.

i should imagine thats what split does anyway.
 
Put 'access 97 split function' into google and you will find functions that people have written that provide the same functionality.
 
inStr might have saved me an extra line of code than if i wanted to do with SPLIT as i needed the position of a character created for mthe split. Thanks for both your help though :)
 

Users who are viewing this thread

Back
Top Bottom