I believe that once Access is opened, it is too late to try and switch to 'read-only'. You will need some type of program to front-end your Access application.
The following is some code that will check the 'ldb' file to see who is logged in. Call would be:
If ShowUserRosterMultipleUsers("OTHER") <> "" Then MsgBox "Other Users are present"
Function ShowUserRosterMultipleUsers(RequestType As String) As String
Dim cn As New ADODB.Connection
Dim cn2 As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long
Dim strUserList As String
Dim strComputer As String
Dim chr As String
Dim char As String
' gvstr_Workstation contains this computer name.
10 On Error GoTo Error_Trap
20 cn.Provider = "Microsoft.Jet.OLEDB.4.0"
30 cn.Properties("Jet OLEDB

atabase Password") = "123456"
40 cn.Open "Data Source=" & gvstr_ServerPath
50 Set rs = cn.OpenSchema(adSchemaProviderSpecific, , "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
' Output the list of all users in the current database.
60 strUserList = ""
70 While Not rs.EOF
80 strComputer = Trim(rs.Fields("COMPUTER_NAME"))
90 i = Len(strComputer)
100 strComputer = Left(strComputer, i - 1)
110 If RequestType = "ALL" Then
120 strUserList = strUserList & strComputer & vbCrLf
130 ElseIf RequestType = "OTHER" Then
140 If strComputer <> gvstr_Workstation Then
150 strUserList = strUserList & strComputer & vbCrLf
160 End If
170 End If
180 rs.MoveNext
190 Wend
200 rs.Close
210 Set rs = Nothing
220 cn.Close
230 ShowUserRosterMultipleUsers = strUserList ' Return all users or just other than me.
240 PROC_EXIT:
250 Exit Function
260 Error_Trap:
...
End Function
Code: Where the vision is often rudely introduced to reality!