Hello everyone,
I am trying to teach myself how to connect to an access database via excel VBA. Can someone explain to me why I am getting an error in this code.
The first sub works no problem.
The second sub will work if I uncomment out the first query and comment out the second. But I want to put the database path in a variable because not all computers in our office are mapped the same, so the "C" drive maybe a different letter on another computer. (Take the 'C" drive as a representation of our server drive).
When I create the variable 'DBPath' and run it, I get an run-time error 1004 when it hits the last line of the with statement (.Refresh BackgroundQuery:=False) and I do not know why.
I tried to upload a copy of the database (its only two items so I know its not overly large), but the forum would not allow it.
Thanks in advance
Ken
Bookmarks