Searching for files

dipen99

New member
Local time
Today, 02:27
Joined
Feb 7, 2013
Messages
2
Hi, I am a basic-intermediate level MS Access user!

I'm currently making a database based on a company and its files.
There are a number of preset documents that must be made
I would like the user to be able to select a project then click a button which brings up the latest version of the document.
I have currently got this working in a form; however it is working as a link from the table the form is getting the data from and so cannot get the latest version unless the link is changed

Is there a way of getting access to search for the latest version of the file and open it (AGNSK2947 03 - Personal Info in the case below)?
This file will always be kept in the same folder however new versions have different names (the 01, 02, 03):

AGNSK2947 01 - Personal Info
AGNSK2947 02 - Personal Info
AGNSK2947 03 - Personal Info
JSHAW4589 01 - Home Info
MOWIA8971 01 - Order Details
MOWIA8971 02 - Order Details

One button will be made for searching the latest version of Personal Info, one for Home Info and one for Order Details, for example.

Thanks a lot for the help! :)

-Dip
 
One possibility is to use the Dir() function to look up the files in the document folder. From there, you can use string manipulation to parse out the type and version of the document. You can loop through the file names, keeping track of the latest version in a variable. Replace the file name in the variable when you find a higher version.
 

Users who are viewing this thread

Back
Top Bottom