|
-
Apr 11th, 2001, 09:28 PM
#1
Thread Starter
PowerPoster
Could someone tell me why this works only sometimes?
It finds results only every now and then when i know there in there. Why?
code:
Public Sub SCHADDEE()
' same as date but for addressee
On Error Resume Next
Dim res4 As String
Dim res5 As String
Dim res6 As String
Dim strInput As String
Set rs = db.OpenRecordset("SELECT * FROM mail")
namequery = InputBox("Enter A Name To Search For", "Name Query")
strInput = namequery
If StrPtr(strInput) = 0 Then
MsgBox "Canceled By User Request", vbInformation, "Name Query"
Else
rs.MoveFirst
Do Until rs.EOF
If rs.Fields("Addressee") Like "*" & LCase(namequery) & "*" Then
res4 = rs.Fields("Addressee")
res5 = rs.Fields("Date")
res6 = rs.Fields("Description")
MsgBox res4, vbInformation, "Addressee"
MsgBox res5, vbInformation, "Date"
MsgBox res6, vbInformation, "Description"
rs.MoveNext
Else
rs.MoveNext
End If
Loop
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|