# Inbox的Cancel出了问题(求救)!!!

Posted by Cloudyland on April 29, 1999 at 21:31:48:

请问以下的程式里有什么问题？当出了Inbox后，如果我有输入任何东西后按OK，它会如常进行；但如果我按下Cancel时，它会话我的程式出错(不论我有没有输入任何东西。请帮忙！

Private Sub cmdSearch_Click()
Dim strID As String
strID = InputBox("Input I.D.:", "I.D.")
If strID <> "" Then
frmApplicationForm.datAF.Recordset.FindFirst "ID = " & "'" & strID &
"'"
End If
If frmApplicationForm.datAF.Recordset.NoMatch Then
MsgBox "Not Found(" & strID & ") this ID!"

strID = InputBox("Input I.D.:", "I.D.")

else

frmApplicationForm.show

datAF.Recordset.FindFirst "ID = '" & strID & "'"
End If
End Sub

thank you!!

Follow Ups:

- Re: Answer for "login" Spencer Yang 00:43:45 4/30/99 (0)