FileDialog will not pick from OneDrive

gt324

New member
Local time
Today, 13:29
Joined
Jan 20, 2017
Messages
3
I am writing in vba for Access 2016
I have used FileDialog(msoFileDialogFilePicker) which works fine on files on my computer (Windows 10) but when I select a file from OneDrive, it just says the file is my OneDrive folder.:eek:

I guess that it sees the OneDrive folder as one big file!

Is there anything that I can do about this?

Graham
 
Probably doesn't help you much but I tried the file picker on my OneDrive folder and it works fine. I have Windows 7 and Access 2013. Did your OneDrive ever work with a Access filedialog? Can you pick files from you OneDrive folder with other applications, e.g., Word or Excel?

I believe a some point in the past Access didn't have the file picker dialog and the GetOpenFileName API was used instead. You could try using that.
 
Thanks very much for that. I see now that the problem is not to do with OneDrive. Any path name that includes a space seems to be a problem. Actually I am not sure now whether the problem is that the file picker returns a truncated string or I am failing to to display the string properly in the Text Box. I will have to look at it with the debugger tomorrow
 
Sorry if I have caused any confusion. It all turns out to be that I was not displaying the the full data that I had picked in a text box. Long names ( which coincidentally contained spaces and were on OneDrive) were truncated but the file picker was working fine all along.

Graham
 

Users who are viewing this thread

Back
Top Bottom