Form Password

V

Van T. Dinh

1. Post the line of code that errors out when you try.

2. 2818 corresponds to the password "PASSWORD"

3. It is correct to change the Filed value of the Field ObjectName to your
Form name.

Please read the article to the end!
 
J

John

The error message is "compile error" method or data member not found. And
it highlights the line If rs.NoMatch Then. Any idea??


John
 
J

Jeff Conrad

It sounds like you need to set a reference to the DAO object library if you are using Access 2000 or
2002. Those versions do not by default set a reference to the DAO library.

To fix the References problem follow these steps:
- Open any module in Design view.
- On the Tools menu, click References.
- Scroll down to you get to Microsoft DAO 3.xx and check it.
- If you're using Access 97 that should be DAO 3.51 Object Library.
- If you're using Access 2000, 2002, or 2003 that should be DAO 3.6 Object Library.
- Close the References box again.
- Now re-compile again. Debug--Compile.
- Hopefully you should not see any more compile errors.

--
Jeff Conrad
Access Junkie - MVP
http://home.bendbroadband.com/conradsystems/accessjunkie.html
http://www.access.qbuilt.com/html/articles.html

in message:
 
V

Van T. Dinh

.... and I guess it is safer to disambiguate the declaration also.

John

Change the lie:

Dim rs As Recordset

to

Dim rs As DAO.Recordset
 
V

Van T. Dinh

You can create a Form "frmPassword" with a TextBox for the user to enter the
password and a CommandButton OK for the user to OK the password.

Instead of the InputBox function, open your Form "frmPassword" in Dialog
mode and use the OK button to pass the text entered back to variable Hold.
 
Top