you need vba for that.
if your db is not split, you need to add this on a Module
Code:
Public Function open_denywrite()
Static rs As DAO.Recordset
Dim db As DAO.Database
Set db = CurrentDb
On Error GoTo access_fail
Set rs = db.OpenRecordset("table1", dbOpenDynaset, dbDenyWrite)
Exit Function
access_fail:
MsgBox "Somebody has opened this already!"
DoCmd.Quit
End Function
create an Autoexec macro that will Run (Runcode) the above function.
"table1" there is but sample table, you may use a "dummy" table or temp table.