Private Sub Command2_Click()
prompt$ = "enter name"
searchstr$ = InputBox(prompt$, "seraching")
datcontainer.Recordset.Index = "Konteyner"
datcontainer.Recordset.Seek "=", searchstr$
If datcontainer.Recordset.NoMatch Then
MsgBox "Couldn't find", vbExclamation, "Result"
datcontainer.Recordset.MoveFirst
End If
End Sub
when i debug this code it shows (visual basic warning) No current records. I just want to use my own message. How can i disable visual basic warnnigs as i mentioned?
i am getting crazy. i want to disable them. can anyone help me please???
thanks...
Last edited by odysseus; Aug 28th, 2005 at 08:09 AM.
What id "datcontainer". Is it a variable or a control?
You may want to take a look at this link regarding The Seek Method.
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
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 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.
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.
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.