Solved

Setting "AllowByPassKey" in a Macro!

Posted on 1998-08-24
7
311 Views
Last Modified: 2008-02-01
Hi,

How can I set the "AllowByPassKey" in a macro?

Setting it like [Databases]![Mydatabase]![Allowbypasskey] does not work, as Access does not recognize [databases] as a collection (like forms, etc...)

Greetings,

   os
0
Comment
Question by:os012897
  • 3
  • 3
7 Comments
 
LVL 5

Expert Comment

by:cekman
ID: 1960076
create a function to do what you want - then call the function from the macro using the runcode command from the macro.

Hope this helps
CEKMAN
0
 
LVL 3

Author Comment

by:os012897
ID: 1960077
So there is no way to set it directly?

os

0
 
LVL 5

Expert Comment

by:cekman
ID: 1960078
I don't know of one - but feel free to reopen the question - I can always repost my original answer if you don't find a better solution.

Good Luck
CEKMAN
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 3

Author Comment

by:os012897
ID: 1960079
Hi CEKMAN,

Yeah, lets do it that way :)!

Thanx for your answer anyways.

Greetings,

        os

0
 

Expert Comment

by:eugeneo
ID: 1960080
That's the only way to do it as far as I know:

Dim db As Database
Set db = DBEngine.Workspaces(0).Databases(0)
Dim pr As Property
Set pr = db.CreateProperty("AllowByPassKey", dbBoolean, False) 'Or True, depending on what you need
db.Properties.Append pr
'This will not always work (e.g. if property already exists)
'For more info see Help under "AllowBypassKey", then select "Example"

0
 
LVL 3

Author Comment

by:os012897
ID: 1960081
Hi eugeneo's!

Thanx for your reply! It is basically (though more elaborated) what cekman proposed .... as he was first I will give him the points! Appreciated your answer anyways.

TO Cekman:

Post a reply and you get them points!

Greetings,

      os

0
 
LVL 5

Accepted Solution

by:
cekman earned 50 total points
ID: 1960082
Thanks!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now