Security on a Form

eburgtech

Jack of All Trades
Local time
Today, 02:06
Joined
Apr 22, 2010
Messages
27
I have a Form that runs a query prior to launching a report that tracks statistics of employee performance in the database. The manager wants only this Form/Report to have security so that it requires a password. I only know of Database-wide security. Is there a way to slap some VB code or something onto the command button perhaps as an On-Click event maybe?
 
Do users have to enter a password to open the db?
 
I did the opposite and specifically let this exposed as the Employees started to become competitive with their peer group.

The form maybe secure, but the Query would have to secure and then some bright spark will work out how to construct a Query.

My favourite is the Management Salaries inadvertantly sent to the Computer Room Printer and left there. That room was, needless to say, extremely popular.

Simon
 
@vbaInet - No, there's no security on the database at all. And really, I don't want to have to place security on the whole database if at all possible. Just either the form or the report or the query. Any of those pieces would be sufficient.

@Simon - lol I totally agree since the reason for these reports in the first place is employee in-fighting about who does more. lol But alas, the boss wants it this way. *sigh* My favorite is employees leaving their print jobs for job hunting on the public printer. lol
 
It's either you hardcode the password or save it into a table and use DLookup() to retrieve the value. E.g.
Code:
If DLookup(...) = "password" then
      docmd.openform "form name"
else
      msgbox "Incorrect Password"
end if
 
OK, I understand. Best solution, is to create a separate FE with all the sensitive forms or Reports. I put mine on a Menu Management and basically if I was forced to restrict users I could just wipe out this Menu.

Even better are job hunters slagging off their current employer or boss on a social networking only to find their prospective employer can also read these comments.

Simon
 
I like the DLookup option. However, I already have an On-Click Event Procedure for the button which launches the form. Is it possible to have a lookup and a DoCmd.OpenForm on the same click?
 
The form maybe secure, but the Query would have to secure and then some bright spark will work out how to construct a Query.

Password protect the BE - stops users from creating their own DB linked to the BE data.
Make the FE an accde, mde or accdr
Do not install Access on users computers, instead distribute the DB with the FREE Access Runtimes. (This also reduces license costs)
 

Users who are viewing this thread

Back
Top Bottom