Copy and Paste Using Text in a Table

Learn2010

Registered User.
Local time
Today, 08:26
Joined
Sep 15, 2010
Messages
415
I have databases set up that are used internally and externally. Externally, we were using VPN and ran into connectivity issues and other limitations of Access.

To solve one of my major problems, my team needs data from various records for the same customers. I set up a small database on their C:Drives. When they are meeting with a customer, they open a form in the main database with the customer's basic information. On that form is a button that, when clicked, exports various records to the small database. On site with the customer they can view and enter new data and I have a process to append or update the main database when they return.

Here is my dilemma. There are PDF files that they need to go with them. These files are saved in a directory with the customer ID as the first part of the name with a brief description. For example, 123456 Parts.

I have scripts with lines such as this:

objFSO.CopyFile "\\net1\root1\sales\orders\123456 parts.pdf" , "\\net1\root2\sales\orders\123456 parts.pdf"

What I need to do is to copy all the files with that customer ID from one folder to another. The customer ID is the key in some of the tables. Is it possible to do this?

Thank you.
 
If you have the customer ID I think you should be able to iterate through the folder and for each file name used the Instr function to determine if the file name contains the customer id.
 

Users who are viewing this thread

Back
Top Bottom