error message - invalid use of null

J

jn

what would cause this error?
access security is weak in that you can easily do a cancel at the initial logon and get to the files.

i developed a logon screen, whereby i check for valid pwd. as part of the testing, i got to the screen, did not key a pwd, then did a close on the form.
when i close, i get this error message. i have tried suppressing parts of my code that i thought could be causing the issue but to no avail. i have suppressed the code in the close routine, other than docmd.quit. that does not help.
as soon as you click, the message pops up.
thanks
 
T

Tony Wainwright

Try adding these lines before you use the value of password

If IsNull(password) then
msgbox "You need to enter a password"
exit sub
endif

Tony

jn said:
what would cause this error?
access security is weak in that you can easily do a cancel at the initial logon and get to the files.

i developed a logon screen, whereby i check for valid pwd. as part of the
testing, i got to the screen, did not key a pwd, then did a close on the
form.
when i close, i get this error message. i have tried suppressing parts of
my code that i thought could be causing the issue but to no avail. i have
suppressed the code in the close routine, other than docmd.quit. that does
not help.
 
D

Douglas J. Steele

If you can cancel at the initial logon and get to the files, then you
haven't secured the database properly.

Check the Access Security FAQ at
http://support.microsoft.com/support/access/content/secfaq.asp for details
of all of the steps you need to take. Read it several times, and work on a
copy of your database. Make sure you don't skip any steps.

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



jn said:
what would cause this error?
access security is weak in that you can easily do a cancel at the initial logon and get to the files.

i developed a logon screen, whereby i check for valid pwd. as part of the
testing, i got to the screen, did not key a pwd, then did a close on the
form.
when i close, i get this error message. i have tried suppressing parts of
my code that i thought could be causing the issue but to no avail. i have
suppressed the code in the close routine, other than docmd.quit. that does
not help.
 

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