I'm having an issue with my databases. I have multiple access databases that share the same pool of users and passwords. They reference the table of users and passwords by a linked table to the 'master' database (the backend that holds the tables for users and passwords). I also have a table that stores the current users and the databases that they are logged into. The problem I'm encountering is that my logout method is not actually logging them out. This is what it is roughly:

```
    'this code is run on click of exit button

 Public Sub logout(UserName As String, database As String)

 On Error Resume Next

 Dim dbMine As DAO.database
 Set dbMine = CurrentDb

 Dim qr As String

   qr = "DELETE * FROM tblCurrentUsers WHERE username = '" & UserName & "' AND       Database        = '" & database & "' ;"
    'debug.print qr
   dbMine.Execute qr

  Application.Quit

 End Sub

```

The problem is, the records don't seem to be deleting. Do I need to set my database object to the source table instead of referencing the linked table that exists in the database on which the code is run? If so, do I just reference that database by relative path?