NXMold
Technical User
- Jul 22, 2008
- 104
I have folders named \[job_number]\ that contain a series of work orders [job_number]_a.doc [job_number]_b.doc and so on. My database is going to create a new document in this folder, and I would like to have it named with the next consecutive letter.
Currently all is working, but new files are named [job_number]_new.doc since there is nothing in the datbase which would indicate what the next available letter is.
Is there a way (reasonably simple and direct, I hope) to gather a list of files in access so that I may discover the highest letter? Once mined, I would like to use a dlookup on this data to get the highest filename, and pick out the last letter using mid([field],6,1)... all that is easy. Just not sure how to grab the file names or where in access I would put them (temp table? using recordsets?).
Currently all is working, but new files are named [job_number]_new.doc since there is nothing in the datbase which would indicate what the next available letter is.
Is there a way (reasonably simple and direct, I hope) to gather a list of files in access so that I may discover the highest letter? Once mined, I would like to use a dlookup on this data to get the highest filename, and pick out the last letter using mid([field],6,1)... all that is easy. Just not sure how to grab the file names or where in access I would put them (temp table? using recordsets?).