UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Allowspecialaccesskeys, Access 2010    
 
   
jwells07
post Jan 5 2017, 02:36 PM
Post#1



Posts: 189
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?
Go to the top of the page
 
datAdrenaline
post Jan 6 2017, 12:48 AM
Post#2


UtterAccess Editor
Posts: 17,916
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!
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    28th March 2017 - 06:34 PM