Good Day

Hi, I am trying to do a parameter search on my form and want it to display a message if the search was sucesful or if a match has not been found it should also give me a message and also clean the information in the text boxes if the match was succesful.

Here is my code that i am using. Please tell me what i need to do and if i need to add the code in the same code below

Private Sub Command61_Click()

On Error GoTo Err_Command61_Click

Dim stDocName As String

stDocName = "Copy Of frm_Vouchers"

'Check values are entered into Voucher number, Pin and Voucher Amount text boxes
'if so display the results or cancel request

If Nz(Me.txtVouchNo, "") = "" Or Nz(Me.txtValue, "") = "" Or Nz(Me.txtPin, "") = "" Then
MsgBox "Please ensure that a valid Card Number, Pin and Voucher Value has been entered?", _
vbInformation, "Required Data..."
Exit Sub
'DoCmd.OpenForm stDocName, acPreview
End If
Exit Sub

MsgBox Err.Description
Resume Exit_Command61_Click

End Sub