How might I accomplish this?

Jacobingram

Registered User.
Local time
Today, 09:53
Joined
Sep 15, 2004
Messages
13
My boss gave asked if I could add this function to the database I have created.

The database consists of thousands of document names, with about ten more fields with the corresponding details. The database has an ASP front-end and is basically intended to run as a slightly more functional "windows explorer", with better search functions etc.

I have been asked to add another two fields (in bold) to the existing ones.

Prospect Name (with hyperlink to folder containing multiple documents)
Company
Prospect Type
Country
Number of files in the folder
Number of files in the folder that have been inputted into the database

They both seem to me like fairly complex tasks, especially the second one.
If anyone has any ideas on how I might do this, or any resources that might be able to help me, I would be grateful.

I know this is not a great explaination, and may not be in the right forum, but if you need any more info I can explain further.

Thanks
Jacob
 
Jacobingram said:
Number of files in the folder that have been inputted into the database

Do you have a field which stores the path of the folder? You should be able to get it from the Hyperlink and then count the records in a query of that path.
 
I do have a "hyperlink" field. How might I make a query that counts the files in the folder though?

Please note : I am not a particularly experienced user in access...
 
There are a couple of ways to do this. Your claim of inexperience within Access might make it tough, though.

The way I do a similar function is in VBA, I use the FileFind object with a wildcard template for the files to be found, but a constant (not-wildcard) path. One of the things in the FileFind object after you execute the search is the .FilesFound collection, which has a .Count property. So you can get the count from FileFind.

When I import something to the datbase, I also RENAME it to a different PATH. In my environment, I have two sub-folders - \INDB and \NOTINDB, so I can search them separately. The VBA "NameAs" verb can do a cross-folder rename as long as it doesn't go cross-partition on your hard drive. Or to another physical disk. A rename from one sub-folder to another IS well within the abilities of the NameAs verb. So after an import, I just parse out the file name from the path, tack on the \INDB path, and do the NameAs.

Both FileFind (or is it FindFile - I can never remember) and NameAs are fully described in your Help files. But you can't get there without VBA code.
 

Users who are viewing this thread

Back
Top Bottom