I'm getting an error and what I assume is that the problem is because some files and folders have an apostrophe in use, for example there is a folder called "A hard day's night". If I exclude this folder from my search it works fine.
Does anyone know how I can ammend my code to correctly grab the file name and location? I assume that its jus
NB: Its not possible to change the name of the folders.
The (possibly) better fix would be to use your Connection object to set up a SQL statement with placeholders. It would be well worth your time to dig through the documentation. An easy place to start is by hitting F2 to bring up the object browser, locating Connection and hitting F1.
I forget how Access escapes quotes... in SQL proper it's just by doubling them up, i.e.:
String with 'embedded' quotes
'String with ''embedded'' quotes'
Access might be requiring double quotes and the use of CHR$(), i.e.: