Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Test for Exclusive state..... 1

Status
Not open for further replies.

flaniganmj

Technical User
Jun 25, 2002
81
US
Howdy all,

This should be rather easy. I'm running a variety of imports from Excel and other databases; however, I would just like to make sure that the database is open in the 'Exclusive' mode before these updates take place. There has got to be some simple code to test for this state. Any help is appreciated.

Thanks,

flan
 
Something like this:
Code:
Function IsExclusive() As Boolean
  Dim strMode As String

  strMode = "Mode=Share Deny Read|Share Deny Write"

  IsExclusive = InStr(CurrentProject.Connection, strMode) > 0
End Function
VBSlammer
redinvader3walking.gif

Unemployed in Houston, Texas
 
VB,

That is exactly what I needed. I wouldn't have thought to use that approach.

Thanks and have a star,

flan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top