Re: recordset.seek problem
What id "datcontainer". Is it a variable or a control?
You may want to take a look at this link regarding The Seek Method.
Re: recordset.seek problem
thanks for replying,
but i looked at that page before. datcontainer is an access database.(like container.mdb)and the konteyner is a column in a table, which is in database(container.mdb) i am trying to manage it by visual basic. I wonder if i can disable visual baiscs' warnings or not. because i put a msgbox. i want to use it without another warnings. if u can help me i will be very appreciate.
thanks.
Re: recordset.seek problem
This should do it.
VB Code:
If datcontainer.Recordset.NoMatch Then
MsgBox "Couldn't find", vbExclamation, "Result"
else
datcontainer.Recordset.MoveFirst
End If
Re: recordset.seek problem
thanks but it doesn't work again. the real problem is recordset.seek which shows "no current record" warning. it means it doesn't show only my msgbox. this important to me because when i save my project in executable form that warning makes my project ugly. that's the problem i am trying to solve.
thanks
Re: recordset.seek problem
Can you check the .RecordCount property to see if it returns 0?
What control are you using? Bound controls are evil. You should be using ADO.
Re: recordset.seek problem
Re: recordset.seek problem
You'll have to post some more code. Maybe the recordset is losing scope?
It returns 15 in that click event? That would be odd. Im thinking it returns 15 somewhere else.
Re: recordset.seek problem
odysseus,
I believe .Seek is DAO. Doesn't work with ADO.
1 Attachment(s)
Re: recordset.seek problem
I sent u find.zip that contains my project(in exe form and vba form.)there is an access database in it(find.mdb) that's the similiar database i use. and there is vb warning.jpeg i try to disable. If you have a chance to look at this, you will understand what i mean.
thanks
Re: recordset.seek problem
I had a look. It's some behaviour of the bound control. See post #6. Data-bound controls are evil.