FileDialog will not pick from OneDrive (1 Viewer)

gt324

New member
Local time
Today, 04:36
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
 

sneuberg

AWF VIP
Local time
Yesterday, 20:36
Joined
Oct 17, 2014
Messages
3,506
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.
 

gt324

New member
Local time
Today, 04:36
Joined
Jan 20, 2017
Messages
3
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
 

gt324

New member
Local time
Today, 04:36
Joined
Jan 20, 2017
Messages
3
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

Top Bottom