Make file name part of a field value

amerifax

Registered User.
Local time
Today, 05:19
Joined
Apr 9, 2007
Messages
304
I'm trying to split up the filename into four separate fields. Here's an example of the filename:
123112 427900 55261 1156833.jpg

A 12312
B 427900
C 55261
D 1156833

The values A, B and C are always the same number of characters. The last value, D, changes in size. It can be anywhere from four characters to twenty. But it always starts at position "20" as with "1" in the case of the 1156833. The extension, jpg, is of no value.

I might also add my programming ability is close to nonexistent.

Bob
 
If your filenaming is consistent then you can use the following

A=left(filename,6)
B=mid(filename,8,6)
C=mid(filename,15,5)
D=replace(mid(filename,21),".jpg","")

I've used the numbers from your filename example as A is 6 characters,not 5 so D starts at 21
 
So I'm assuming, from the response, that the filename would have to be part of a field. And that would be okay but how would I get the filename into access, 365, as a field name.

I also failed to mention that the file name has to be changed to the second set of characters, B, or 427900 and than linked to the record. The file is a JPEG or PDF image.
Bob
 

Users who are viewing this thread

Back
Top Bottom