This is an "all-or-nothing" approach that will screen users based on network User Name when they try to open the database, but it won't control access to forms, tables, queries, etc., within Access.
In your database, store the VBA code listed below in a module. Then create an Access Macro called "AutoExec" -- this will automatically fire when the database opens. Define the AutoExec macro to run the "AutoExec_Function" function. I know this is convoluted but it's the only way to get Access to run VBA code on startup.
=============================================
VBA code follows
=============================================
Public Function AutoExec_Function() As Boolean
'
' this must be a Public Function to be called by the Autoexec macro
'
Select Case GetNetworkUserName()
' list approved network User Names here
Case "user1", "user2", "user2"
Case Else
MsgBox "Sorry, you are not authorized to open this database."
CurrentDB.Close
End Select
AutoExec_Function = True
End Function ' AutoExec_Function
Public Function GetNetworkUserName() As String
Dim sNetworkUsername As String
Dim wshNetwork As Object
On Error GoTo LeaveFunction
sNetworkUsername = "" ' default
Set wshNetwork = CreateObject("WScript.Network")
sNetworkUsername = wshNetwork.UserName
LeaveFunction:
Set wshNetwork = Nothing
GetNetworkUserName = sNetworkUsername
End Function ' GetNetworkUserName