Solved

Setting "AllowByPassKey" in a Macro!

Posted on 1998-08-24
7
345 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

733 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