There are quite a few reasons why that may be a problem.
Start with the obvious: is the file available to all users? It's quite possible that the Connection Wizard isn't using your user ID to access the file, so if the file or teh folder it's sitting in doesn't have the required access permissions for all users, then it could easily fail.
After that, check the type of DB engine you have installed to connect to Access files: ACE or JET. JET is the older version, and isn't available in a 64 bit version - so again you could get a failure connecting there if the code trying to connect is 64 bit or "any CPU". But...Visual Studio itself is a 32 bit app, so it can't use 64 bit drivers directly - so if the connection tester is actually part of VS it could be failing because the DB engine is 64 bits and it can't run that!
Basically, we can't tell you "do this, and it'll be good" - but if you get more grief when you've looked that those things, try modifying an existing DB connection string and using it in an OleDbConnection object in your code:
Access connection strings - ConnectionStrings.com[
^] may well help.