Allowspecialaccesskeys, Access 2010
Jan 5 2017, 02:36 PM
Joined: 25-June 07
I'm trying to disable special access keys for the ade file I'm distributing so I've put CurrentDb.CreateProperty("AllowSpecialKeys") = False in the Load event of the startup form. This works fine in the adp file but generates an error when opening the compiled ade file only at startup but the db functions as expected after startup.
The error says: The expression On Load you entered as the event property setting produced the following error: Object variable or With block variable not set.
It is the only statement I have in the Load event. What am I doing wrong?
Jan 6 2017, 12:48 AM
Joined: 4-December 03
From: Northern Virginia, USA
This is not working in your ADP either ...
In an ADP, CurrentDb returns Nothing. That's because CurrentDb returns a reference to the JET/ACE database (MDB/ACCDB) in which the code is running using the DAO object model. An ADP file is a "project" with no data of its own. For most purposes, you would do better to use an ACCDB or MDB file with linked tables, rather than an ADP, especially since ADP's are deprecated.
Brent Spaulding | datAdrenaline | Access MVP
It's all very well to tell us to forgive our enemies; our enemies can never hurt us very much. But oh, what about forgiving our friends? - Willa Cather; As always - Pay it Forward!
|Search Top Lo-Fi||28th March 2017 - 06:34 PM|