Full Version: Jump to folder from datasheet record
UtterAccess Forums > Microsoft® Access > Access Forms
Hello all,
I am making some upgrades to a database that we use to control jobs in our company.
I currently have a form with returns the results from a wildcard search of a job number, as a datasheet view in a subform. What I am looking to do, is to be able to have the user double click on any part of the record that is in that datasheet row and have it go directly to a folder on our network where files associated with that job are stored. Is this possible? I have searched the forum here and google, and can't seem to find a solution.
I am currently using this to get to the folder from a form, but it is called from a command button...
Shell "C:\WINDOWS\explorer.exe \\\f\Salespeople Folders\" & Me.Combo0.Column(1) & "\" & Me.textboxJobNumber, vbMaximizedFocus

Thanks in advance for the help!
Doug Steele
I wouldn't have expect your code to work properly, due to the presence of spaces in the folder name.
would think you'd need:
Shell "C:\WINDOWS\explorer.exe ""\\\f\Salespeople Folders\" & Me.Combo0.Column(1) & "\" & Me.textboxJobNumber & """", vbMaximizedFocus

You can call that code from the DblClick event of the text boxes on your datasheet.
What would probably be easiest if if you created a function (not a sub) in your form that has that call to Shell in it. You can then select all of the text boxes on your datasheet. While they're all selected, go to the Properties window. Putting the name of the function you just created as the On DblClick property will make it apply to all of the selected controls.
erfect!!, that did the trick..
For some reason I wasn't really thinking today crazy.gif crazy.gif
Thanks for the help and the quick reply!
thanks.gif uarulez2.gif
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.