-1

Greetings!

I am using find command in vb6 using to conditional statement.

Call dbconek
With ar
.Open "Select *From numgroup", strconek, adOpenStatic, adLockOptimistic
.Find "numero = '" + bet + "' And "draw_date = " & DateValue(vdrawdate.Text) & "", 0, adSearchForward
If Not .EOF Then
msgbox "record is existing"
Else
msgbox "record is not existing"
End If
End With

I received error from .find command "Type mismatch Error 1"

my datafield
numero -----> string
draw_date -----> short date

my variables
bet ------------> string
vdrawdate.text --------> as textbox

the error comes from draw_date and vdrawdate.

anybody can help me or there is any other solution.

thank in advance

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by QVeen72
0

Why not simply use the WHERE clause along with the SQL statement to find the record. You can also use COUNT to find if the record exists and then display the message accordingly. Using COUNT will be really fast.

0

Hi,

I Guess, if it is an ADO recordset, you can give Just One Column Search, (not multiple).
Like Debasis said, open another Recordset with "Where" Condition

Regards
Veena

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.