Tom I dont know how to express my thanks.
I cant describe it words.
All that i can write is "Thanks A Lot"

I wish All the very best for you for your future plans.
May God shower the ever best possible blessings for you.

Thanks Thanks.... thanks

Syrus







"Tom Wilson" <CyberCyclist@msn.com> wrote:
>
>If my previous suggestion didn't work, try setting the Source property to
>"Select Count(*) as CountRecords from MyTable Where my_code='myValue'"
>
>This should only return 1 record with 1 field. That field should have the
>number of records that conform to the where clause.
>
>"Tom Wilson" <CyberCyclist@msn.com> wrote:
>>
>>I didn't change the recordset properties.
>>Try a static, client side recordset.
>>
>>>>> Dim Rs as ADODB.Recordset

>>
>>>>> Set Rs = New ADODB.Recordset

>> With Rs
>> .CursorType = adOpenStatic
>> .CursorLocation = adClient
>> Set .ActiveConnection = Conn
>> .Source = "Select Count(*) from MyTable Where my_code='myValue'"
>> .Open
>> end With
>>
>>>> If Rs.Fields(0) >= 1 Then
>>>> MsgBox "This Rec Already exists"
>>>> End If

>>
>>Hope this helps.
>>
>>

>