Unanswered: Add record not working with vb in access
I am trying to add a record to a table using VB in access but instead of adding the record it just replaces the first record in the table.This is driving me crazy so can someone help me please.It is basically a registration form with 3 fields, UserName, Password, and reenterpassword , and I have a macro that adds a record, it's called "add" and it works perfectly without the 2 commands DoCmd.OpenForm and the command DoCmd.Close.But with these 2 commands it doesn't work for some reaon.
This is my Code.
Private Sub Command12_Click()
If Password = reenterpassword Then
MsgBox "Please check if you have re-written the password correctly"