Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ceck to see if access is opening up through a predefined MDW File

Status
Not open for further replies.

THEGREEK

Technical User
Aug 17, 2000
51
CA
Hi,

I was just wondering if this is even possible, for example on startup, If I were to create a form that checks to see what active security file (*.mdw) if any, was used to access that session of the application? If the user did not login using the correct security file, auto kick him & shut down, but if they are process as normal...

Thanks in advance,
THEGREEK
 
If someone has tried to bypass the .mdw, they will always be recognised as the user "Admin". In your security file, it's a good idea to reduce the "Admin" user to the lowest level of access.

I have an Autoexec macro that checks the status of a function. The function also performs some other bits and pieces, but here is the bit that may interest you:

Public Function CheckUser() as Boolean
If LCase(CurrentUser) = "admin" Then
MsgBox "This database is LOCKED!" & vbcrlf & vbcrlf & _
"Go away and open the database properly!"

CheckUser = False

Else
CheckUser = True
End If
End Function

The Autoexec macro has a condition where if CheckUser()=False, the action is Quit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top