Link to home
Start Free TrialLog in
Avatar of dellanphony
dellanphonyFlag for Australia

asked on

create command button on microsoft access form that opens folder/file with same title as a field value in the database

I want to create a command button on my access form that when clicked opens a folder on my directory that relates to the record currently being viewd. The name of the folder is the same as one of the fields in my database (CitationCode). So, for example, when "Smith et al 1997" is shown in the CitationCode field, then when clicked it should open the "Smith et al 1997" folder that exists in the same directeory as the access database.

I also want to have a seperate button that will open a pdf (again with the same name as in CitationCode) and an excel file, but once I get a solution for one of these im sure i can figure the others out.

I found a solution for this on the web previoulsy, but I cant for the life of me find it again!!

Avatar of bluelizard
Flag of Switzerland image

check out the code at  you can open folders and "start" documents with this code.

Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dellanphony



sorry for delay - been offline. i will try to work through your solutions now (im not that familiar with code) but should be able to work it through. i also found the link to the site where i was able to work it out from last time -

ill get back soon and if it works to assing points
thanks capricorn1 - works a charm! (sorry it was so simple!)