Open an explorer-window with the click on a button (1 Viewer)

fossy19

New member
Local time
Today, 16:21
Joined
Nov 21, 2010
Messages
2
I am modifying an Access 2010 database and I ran into a problem. VBA is probably the solution, but I am not familiar with it. Just scratching the surface I'm afraid...

I want to click a button in my customer-form, making Explorer.exe to open and show me the content of the customers folder on my server.

The database is basicly containing my customers name, contact data and sessionnumber.

I have tried this simple code:
Shell ("Explorer.exe /e,Link")

"Link" is the name of a calculated field in the main table connected to the form, and contains the correct path to the customers folder. I was hoping to make VBA read the "Link"-text in the table-field and open that folder for me, with just one click.

Can you please guide me to the solution?
 

fossy19

New member
Local time
Today, 16:21
Joined
Nov 21, 2010
Messages
2
Thanks Mr.B, your reply pointed me in the right direction.

I did some more searching and found a code that solved my problem right away, this works for me!

Dim reVal
retVal = Shell("explorer.exe " & Me![Link], vbNormalFocus)


Here is a link to where I found it: (I was not allowed to post this with a link yet, so put in the missing "h" first)
ttp://bytes.com/topic/access/answers/584103-using-call-shell-open-specified-folder
 

Users who are viewing this thread

Top Bottom