Sonia

Would you please be more specific in your meaning of "credentials"?

If you mean add a new user to the database then it will be advisable to use a form. The code can be used to add a new user when the user id is not valid. But the question is has a valid user entered an incorrect user id or an incorrect paasword, or an employee has entered an user id in the process of obtaining unauthorised access to the database?

Using a form you are able to control the users who have access to the database.