basically you need to perform a select query to select the username and password and see if that matches the user inputs. Simple connect to the database, perform a query and use a DataReader (OleDbDataReader) to see if there were any results returned - if they did then you know that the authentication was valid. Here is a quick example and hope it helps:
Dim connection as new OleDbConnection(ConnectionStringHere)
Dim command as new OleDbCommand("SELECT [ID] FROM [Table] WHERE [usernameField] = @username AND [passwordField] = @password", connection)
Dim usernameParam as new OleDbParameter("@username", Me.txtUsername.Text)
Dim passwordParam as new OleDbParameter("@password", Me.txtPassword.Text)
Dim reader as OleDbDataReader = command.ExecuteReader()
if reader.HasRows then
MessageBox.Show("you are authenticated")
MessageBox.Show("username and or password are not found")
Be sure to import the System.Data.OleDb namespace to access the OleDb classes and replace the text inputs to obtain the username/password correctly in addition to replacing the column/field names in the query to your database column/field names.
Basically it is simply creating the command to execute on the database level and giving it the correct statement and parameters - the parameters values are obtained from the input source (username/password in this case from the user) to see if they exist in the database. It then executes a data reader to see if any rows have been returned when executing that query, and if there are the HasRows property in the datareader will return true, else false.
Does this help