I am trying to create a username and password script in access VBA. Basically I have created a form with 2 text boxes, one called username and the other called password. I have a table called user_info where the users password and username plus some other information is stored. The username is the unique key which uiquely identifiers a record. What I want is a script that recognises what has been entered into the username field and checks that the password entered is associated with that username. If it is I want a new form to be opened (which I have called user_info) and the record to be shown which corrosponds to the username. I.e. if the username is 1234 I want the form user_info to be opened and the record with unique number 1234 to be displayed.

Thankyou in advance for any help.