I had this great idea roughly "wouldn't it be nice to be able to click a button on my form that would open the folder that relates to the current form record". Does anyone know how I would go about coding the on click event? Thanks!
Hey,
yeah that's a good idea. I've had it implemented for about a year now, it works very nicely.
It takes several steps to get to this point where you have a button that takes you to the folder.
You have to create the folder
mkdir "foldername" 'this could occur at any time you need the folde rto be created. it creates and error though if the folder already exists.
You have to save the path of the folder name in a table
fieldname = foldername
You should have to create a button that takes you there.
I made one button that does both events.
If you look at microft's help file on hyperlinks, it will tell you how to assign hyperlink properties on a control button that will take you to your folder.
the hyperlink would be something like:
private btnGotofolder()
dim stFolder as string
dim ctl as control
stFolder = me!folderName 'where folder name is a field in your form. I have a more complicated string, it includes the first and last name of a client and their ID number, almost every one gets a folder.
set ctl = me!btnFolder
with ctl
.Visible = False
.hyperlinkaddress = stFolder
.hyperlink.follow
end with
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.