Yes, the .ldb is created whenever you open an Access Database on whatever machine you are on, it stands for locked databse. If Access doesn't close cleanly, the .ldb might still exist, which could potentially cause you problems next time you open Access.
If you are opening the database and running this query while someone else is using it and not using a form, you might have problems updating a table.
Three possibilities to ensure the table is not locked:
1. Ensure no one is in the database prior to your next test
2. Split your database, and have a front end database with a graphical interface that users can interact with.
3. Create a button on a form and run the process by clicking the button.
If you need to have control over users exiting, you could include a time event and add a table. In the table, you could have a true/false datatype and have the database check if the value of the field is set to true/false whichever value you prefer, and once the value meets the critearia for database shutdown, add a message box to let the users know the database will shut down in x minutes. The database then shuts down which should be cleanly this way.
To ensure you are the only accessing the database add some code like the following:
Private Sub cmdGetUser_Click()
Dim myLogon As String
myLogon = GetLogonName()
If myLogon <> "loginName" Then
MsgBox "I don't know you. Application will now close."
MsgBox "Welcome Username."
Once you have done what you need to do, change the database field in the table so the time does not cause shut down, and then everyone can start working on the database again.