Auto running a password script on start-up (how to)

  • Thread starter Thread starter chang
  • Start date Start date
C

chang

I am trying to write a script that will run automatically when the database
is loaded, and if it is not the date that i have pre-put into the script,
the databse will then ask for a password. and until the password is put in,
you cant use the databse. Can someone please help me with this script
 
1. Create a macro called Autoexec
2. In the macro setup RunCode - code name ckPass
3. Create a module named modCkPass
4. Create the following function in ModCkPass

function modckpass()
dim vDevDate as date
dim vToday as date
vDevDate = #7/28/04#
vToday = date()

If vDevDate = vToday then
docmd.openform "MainMenu"
else
docmd.openform "Password form"
endif

David
DataOverTheWeb.com
-----Original Message-----
I am trying to write a script that will run
automatically when the database
 
Thank you very much, but how would i be able to create a login form? i
dont nead it to have a username and password, just a password would be
good enough.

thank you
 
Thank you very much, but how would i be able to create a login form?

Simply create a Form of your own choosing; use Tools... Startup to
tell Access that it's the desired startup form.

Note that the user can get around this if they're moderately
sophisticated (hold down the Shift key while opening). You can block
this option if you wish.
 
Back
Top