Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / May 2005

Tip: Looking for answers? Try searching our database.

Run Time Error 13

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
B - 31 May 2005 10:57 GMT
Function DisableByPassKeyProperty()
Dim DB As Database
Dim prp As Property

Set DB = OpenDatabase("testing.mdb")
Set prp = DB.CreateProperty("AllowByPassKey", dbBoolean, False)
DB.Properties.Append prp
Douglas J. Steele - 31 May 2005 23:05 GMT
The Property object exists in many different object models. Since you're
using DAO, it's essential that you get a DAO Property.

Replace

Dim prp As Property

with

Dim prp As DAO.Property

There would be nothing wrong with using Dim DB As DAO.Database, but since
(at present) no other object model than DAO has a Database object in it, you
can probably get away without the specification (FWIW, I always use
DAO.Database)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Function DisableByPassKeyProperty()
> Dim DB As Database
[quoted text clipped - 3 lines]
> Set prp = DB.CreateProperty("AllowByPassKey", dbBoolean, False)
> DB.Properties.Append prp
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.