I have a database in Access 2003 that I only want certain people to be able to access. In my database I have a table which lists the people that should be able to access the da
Could you not just do something like this
Dim rst as Recordset
Dim sql as string
sql = "SELECT * FROM Tbl_BIRT_Users WHERE ntlogin = '" & Environ("UserName") & "'"
set rst = CurrentDb.OpenRecordset(sql)
if (rst.bof and rst.eof) then
/*not a valid user*/
DoCmd.Quit
else
if not rst!Administrator then
/*make read only*/
end if
end if
rst.close