Opening a file in a directory from access

woknick

Registered User.
Local time
Today, 03:55
Joined
Sep 25, 2004
Messages
85
I have a combo box that lists account numbers for clients. I also have a directory on my hard drive that contains Dymo label files with the clients account number as the name of the file. I would like to select an account from the combo box and click a button to open the Dymo label file that corresponds with the account number.

Is there a way to do this..?

Thanks in advance
 
There a couple of ways :

you could use a select case statement and the shell command, this option is only useful if there are only a couple of files.

Ideally, you should store the filepaths for each file in the table then using VBA code using the shell command to open the relevant file.

I posted a sample db a while ago, in the sample db forum, called something like 'Store specific filepath ....' take a look at the code and this help you.

Post back if you have any probs.

Andy
 

Users who are viewing this thread

Back
Top Bottom