Hi everyone,

I have this vba code for querying data from an Access database(.accdb).

Please Login or Register  to view this content.
Everything works fine on my machine, but when I tried to run it on a different machine, I get an error message:

"-2147467259 Could not find the file 'C:\Users\user\Desktop\<filename>_be.accdc".

What I notice in the error message is that the filename is not the same as specified in strFile variable and the whole path is not changed to the users path. It still using the path from my machine.

kindly help me on this one please.

thanks in advanced.