Extracting filename to populate field in Access table

M

Matt

Hello.

I'm very new to Access (2003) and have been thrown in at the deep end doing
data migration.

I have a number of excel files containing order data, where the order number
is the filename ie 0123456.xls has order no. 0123456.
To automate the process, I need to use the filename to populate all the
fields in the order no. column in a temp table.

I have been trying to look at VBA solutions to this but my skills are
lacking. I would appreciate any assistance in achieving this.

Many Thanks

Matt
 
O

Ofer Cohen

If I understand you want to be left with the order number using the file name.
Try

Left([FileName],Instr([FileName],".") -1)
 
Top