Ah yes, the good ol' 'Stack Overflow' error, which can be caused by various things; I'd describe it as usually caused by a coding error that uses up a part of memory that's set aside for remembering where the program is, with recursive processess... including nested If statements that aren't properly having a chance to "End"...
It looks like your if your nested If's are TRUE, the program isn't making it back to the End If statements, overloading the poor processor. (I could have that description completely wrong, but that's how I understand it!)
I would change the code to remove all those nested If's, something like below, then it's neat and today, and also can warn the user about errors on multiple fields at once.
Private Sub Reset_Password_Click()
Dim sSql As String, db As Database, sWarn As String
sWarn = ""
If IsNull(Me.username) Then sWarn = sWarn & "Username Required!" & vbCrLf
If IsNull(Me.Date_Of_Birth) Then sWarn = sWarn & "Date of Birth Required" & vbCrLf
If IsNull(Me.Email) Then sWarn = sWarn & "Email Address Required" & vbCrLf
If IsNull(Me.mobile) Then sWarn = sWarn & "Mobile Number Required" & vbCrLf
If IsNull(Me.Post_Code) Then sWarn = sWarn & "Post Code Required" & vbCrLf
If IsNull(Me.new_password) Then sWarn = sWarn & "New Password Required" & vbCrLf
If IsNull(Me.Confirm_Password) Then sWarn = sWarn & "Password Re-Enter Required" & vbCrLf
If sWarn <> "" Then 'something was wrong. Display the error(s)
If (IsNull(DLookup("[Username]", "Users", "[Username] ='" & Me.username.Value & "' And [Date of Birth] = #" & Me.Date_Of_Birth & _
"# And [Email] = '" & Me.Email.Value & "' And [Mobile] = '" & Me.mobile.Value & "' And [Postal Code] = '" & Me.Post_Code.Value & "'"))) Then
MsgBox "Incorrect Details Entered"
'if we made it to this point then everything must be entered alright.
sSql = "Update Users Set [Password] = '" & Me.new_password & "' WHERE [Username] = '" & Me.username & "' ;"
Set db = CurrentDb
db.Execute sSql, dbSeeChanges
If db.RecordsAffected <> 1 Then
MsgBox "Error while changing password"
MsgBox "Password Changed"
I also added a line to warn you if the password change affected zero (or more than one!) records. That's unrealted to the error, it's just a hangup of mine.