CJBIRKIN
Drink!
- Local time
- Today, 02:26
- Joined
- May 10, 2002
- Messages
- 256
Hello
I am trying ( in vain ) to create a password admin form for a database.
Background:
I have one table Tbl_LOGIN with
USER_ID (AUTONUMBER) PK
USER_NAME(TEXT)
USER_PASSWORD(TEXT)
USER_LEVEL (INT)
A SECOND TABLE
TBL_USER_LEVEL
LEVEL_ID (AUTONUMBER) PK
LEVEL_DESCRIPTION (TEXT)
USER_LEVEL AND LEVEL_ID are linked in a query
I have then built a form on the query and used a combobox on the form to allow the administrator to select the users level with TBL_USER_LEVEL. LEVEL_ID being stored in the Tbl_LOGIN.USER_LEVEL field for that record.
As i don't want anyone to have access to the passwords i also have a password reset button that simply defaults a new user- or someone who has lost there password -to a standard default which is then required to be changed on their next login. So far so good.
The problem is error trapping.
basically i don't want the administrator to create a duff user i.e one without some required data. I have been able to error trap most of the problems, however if they create an user without a level of access and then navigate (record select) the recordset i get the message
"The microsoft jet database engine cannot find a record in the table TBL_USER_LEVEL with key matching field(s) Tbl_login.User_level"
The problem occurs before the current event procedure but after the beforeupdate . It doesn't have an error code so i can't clear the error either. However the the form_error procedure is called.
How can i stop this from happening?
Cheers
Chris
I am trying ( in vain ) to create a password admin form for a database.
Background:
I have one table Tbl_LOGIN with
USER_ID (AUTONUMBER) PK
USER_NAME(TEXT)
USER_PASSWORD(TEXT)
USER_LEVEL (INT)
A SECOND TABLE
TBL_USER_LEVEL
LEVEL_ID (AUTONUMBER) PK
LEVEL_DESCRIPTION (TEXT)
USER_LEVEL AND LEVEL_ID are linked in a query
I have then built a form on the query and used a combobox on the form to allow the administrator to select the users level with TBL_USER_LEVEL. LEVEL_ID being stored in the Tbl_LOGIN.USER_LEVEL field for that record.
As i don't want anyone to have access to the passwords i also have a password reset button that simply defaults a new user- or someone who has lost there password -to a standard default which is then required to be changed on their next login. So far so good.
The problem is error trapping.
basically i don't want the administrator to create a duff user i.e one without some required data. I have been able to error trap most of the problems, however if they create an user without a level of access and then navigate (record select) the recordset i get the message
"The microsoft jet database engine cannot find a record in the table TBL_USER_LEVEL with key matching field(s) Tbl_login.User_level"
The problem occurs before the current event procedure but after the beforeupdate . It doesn't have an error code so i can't clear the error either. However the the form_error procedure is called.
How can i stop this from happening?
Cheers
Chris
Last edited: