Happy New Year to all.
I have a form that contains a button that opens a folder browsing window which allows the user to select a specific folder on a server and it stores the folder path on the form which can be clicked on and opened for later use. I have it set so that the path when you first click on the button is linked to a folder path on another server. This is so the user does not have to click so many different file paths. My button opens up to the correct path and the user just has to select a single folder. My problem is that when I first open the database and go to enter data into a form, I click on the button and an error is displayed "Unable to browse the network...The request is not supported." It then defaults to the folder browsing window with all the available networks on it. Once I clicked the correct path to the folders I want, the button works just fine thereafter. It's like access does not know I have access to that network unless I show it I do.
My code is just...
spath = UnqualifyPath((path of server I want button to directly open up to))
Me.txtDir.value = BrowseForFolderByPath(spath)
BrowseForFolderByPath is a function located in a module. It is lengthy and I believe I got it from this site. If you would like to me to put it on just let me know.
Is there any code that can check the path to the server on an "on load" so that the error message doesn't come up anymore? Or is there a better a better way to bring up a specific directory and allow the user to select a folder to store on the form?
Thanks in advance for your help.
I have a form that contains a button that opens a folder browsing window which allows the user to select a specific folder on a server and it stores the folder path on the form which can be clicked on and opened for later use. I have it set so that the path when you first click on the button is linked to a folder path on another server. This is so the user does not have to click so many different file paths. My button opens up to the correct path and the user just has to select a single folder. My problem is that when I first open the database and go to enter data into a form, I click on the button and an error is displayed "Unable to browse the network...The request is not supported." It then defaults to the folder browsing window with all the available networks on it. Once I clicked the correct path to the folders I want, the button works just fine thereafter. It's like access does not know I have access to that network unless I show it I do.
My code is just...
spath = UnqualifyPath((path of server I want button to directly open up to))
Me.txtDir.value = BrowseForFolderByPath(spath)
BrowseForFolderByPath is a function located in a module. It is lengthy and I believe I got it from this site. If you would like to me to put it on just let me know.
Is there any code that can check the path to the server on an "on load" so that the error message doesn't come up anymore? Or is there a better a better way to bring up a specific directory and allow the user to select a folder to store on the form?
Thanks in advance for your help.