I had the following code written in Excel 2003. A zip code entered in Excel could be looked up in Access and the State, County plus other data could be transferred back to excel. This worked in Excel 2003, but when I change the target file to an Access .accdb rather than the .mdb file I get the crash at .Refresh BackgroundQuery:=False which I presume is an indicator of code errors.
My question is what needs to be amended in the code to allow me to connect with the .accdb file?

Please Login or Register  to view this content.
Please note that I opened the Access.mdb file and resaved it as an .accdb file. Therefore the only change to the code above is the file name in line 1 is TestData.accdb

Many thanks
Harle