Well, it looks like you are an absolute beginner (that should sting a bit, but you kind of deserve it with a question like this), so let's keep it simple.
What I would do in your case (I believe the Form contains all information, including the correct code) is have a String field like this:
Private _code As String
In each of you Button Event Handlers you can concatenate your string.
Private Sub cmd0_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmd0.Click
_code += "0"
End Sub
Private Sub btnVerify_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnVerify.Click
If _code = "62498" Then
Else
End If
End Sub
Private Sub btnReset_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnReset.Click
_code = String.Empty
End Sub
So first you build up the _code field in the different Button.Click Events. After that you can verify the code by comparing it to your access code. You can simply reset the password by emptying the String.
I guess I kind of did your homework for you.
And maybe you should read your books before coming here too...