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

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
 
G

Guest

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
 
C

chang

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
 
J

John Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top