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 / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

Is another DB opened exclusive

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
XP - 15 Nov 2006 14:01 GMT
In Office 2003:

Does anyone have a working VBA function that will ping another DB and return
TRUE if the DB has been opened exclusively; false if not?

If so, could you please post it? Thanks.
Roger Carlson - 15 Nov 2006 15:02 GMT
Function OpenExclusiveTest(Filename As String) As Boolean
On Error GoTo Err_OpenExclusiveTest

   Dim db As DAO.Database
   Set db = OpenDatabase(Filename)
   OpenExclusiveTest = False

Exit_OpenExclusiveTest:
   Exit Function

Err_OpenExclusiveTest:
   If Err.Number = 3045 Then
       OpenExclusiveTest = True
   End If
   Resume Exit_OpenExclusiveTest
End Function

Signature

--Roger Carlson
 MS Access MVP
 Access Database Samples: www.rogersaccesslibrary.com
 Want answers to your Access questions in your Email?
 Free subscription:
 http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

> In Office 2003:
>
> Does anyone have a working VBA function that will ping another DB and return
> TRUE if the DB has been opened exclusively; false if not?
>
> If so, could you please post it? Thanks.
 
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.