Put this at the top where declarations go
Public gvar as Variant
-----------------
Put this behind the button you want to use.
Public Sub Find_Last()
On Error GoTo Err_find_Click
'StartTestCode
Dim dbs As Database, rst As Recordset, MyResponse As Variant, Response As Integer
Dim strCriteria As Variant
Screen.PreviousControl.SetFocus
strCriteria = InputBox("Enter Search Criteria", "FIND", gvar)
If strCriteria = -1 Then
MyResponse = strCriteria
GoTo Exit_find_Click
Else
DoCmd.FindRecord strCriteria, acAnywhere, , acUp, , , False
gvar = strCriteria
'If strCriteria.match Then
End If
'DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_find_Click:
Exit Sub
Err_find_Click:
'MsgBox Err.Description
gvar = strCriteria
If Not strCriteria = Empty Then
MsgBox "(" & strCriteria & ") Not Found", , "RESULT"
Else
Response = acDataErrContinue
End If
Resume Exit_find_Click
'End Test Code
End Sub