Full Version: Jump to folder from datasheet record
UtterAccess Forums > Microsoft® Access > Access Forms
Krasno777
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...
CODE
Shell "C:\WINDOWS\explorer.exe \\10.0.1.15\f\Salespeople Folders\" & Me.Combo0.Column(1) & "\" & Me.textboxJobNumber, vbMaximizedFocus

Thanks in advance for the help!
Steve
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:
CODE
Shell "C:\WINDOWS\explorer.exe ""\\10.0.1.15\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.
Krasno777
Doug,
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
Steve
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.