OK, I put something together but it assumes that
(a) you are using ms access as your tool.
(b) textbox2 is the master text box
(c) I left out the grading part of the code and provided the letter comparison part instead.
(d) what you enter in the textboxes are not words but some simple identifying code like a social security number/credit card number/name/etc...
Item (d) is important because you need a more complicated routine if you are enterring words (looking for something like a critical change). The routine I provided looks for an exact match on the entries between the boxes.
Dim x, y, t, tt, z
x = Len(TextBox1.Text)
y = Len(TextBox2.Text)
If x > y Then
t = y / x
Else
t = x / y
End If
If t < 0.8 Then
Msgbox.Show("the text is tooo short")
End If
tt = 1
z = 0
Do Until tt > y
If Mid(TextBox1.Text, tt, 1) = Mid(TextBox2.Text, tt, 1) Then
z = z + 1
End If
tt = tt + 1
Loop
MsgBox.Show(CStr(z / y))
I hope this helps.
Q