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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking table lock status.

Status
Not open for further replies.

Kraeg

Programmer
Jun 27, 2002
113
0
0
AU
Is there a way using VBA to check if a table has any records at all locked/being viewed or edited?
 
Try to get exclusive access
Code:
Dim rs As DAO.Recordset
On Error Resume Next
Set rs = db.OpenRecordset ("tblName", dbDenyWrite + dbDenyRead )
If Err.Number > 0 Then
   MsgBox "Table in Use"
End If
Set rs = Nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top