I’ve spent a couple of days recently trying to get Access 2003 Data Access Pages (DAPs) working within a Windows 7 environment.
Yes, I know DAPs are no longer a supported technology as far as Microsoft are concerned but what The Client wants The Client gets. And they did have a reasonable reason for wanting DAPs to work at least in the short to medium term.
What are the symptoms?
When you open the DAP within Access it all works swimmingly, however when you open the DAP directly by double clicking on the .HTM file any data fields (text boxes etc) within the DAP are populated with the dreaded “#Name?”.
The same DAPs work fine on XP Pro machines but not Win7 Pro. I’d even gone as far as creating fresh virtual machines to ensure there were no corrupt or missing DLLs and OCX files but no joy.
Googling for solutions didn’t help – DAPs have long since been abandoned by Microsoft and most users and Access developers have moved on, so answers were thin on the ground – a few others have been seeking solutions but none of the proposed answers that worked for them worked for me.
I was left with trial and error. I’d assumed the issue lay with IE9 (or IE8) but as “Compatibility Mode” didn’t help I decided I had to minimise the security within IE9 as far as I could and see if I could the DAPs to work. Which they did! I then had to unpick all the settings again until I found out exactly which setting had caused the issue.
So what’s the solution?
- Firstly you will have to place the files and database in a folder which is accessible via a UNC path (e.g. \computerfolder), this is so that when you view the files in IE, IE will understand that they are in the “Intranet” security zone.
- Connect the DAP and the database using the UNC path.
- Within IE, click the Tools menu (or the cog, dependent on version) and select “Internet Options”
- Go to the “Security” tab
- Click “Local Intranet”
- Uncheck the box labelled “Enable Protected Mode”
- Click “Custom Level…”
- Scroll down the list of settings until you find “Initialize and script ActiveX controls not marked as safe for scripting”
- Click “Enable” (NOTE: selecting “Prompt” will NOT work)
- Click OK twice to return to IE
- Close IE
- Open the DAP and it should work.