Can you show a bit of your code behind your form? I presume your building this in VB6 studio?
I can help you, just hang in there, give me a little more info. while i re-install vs 6.
I did something similar but I havn't touched data controls for about 4 years
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
Well it works fine for me too here!
What is the error text from debug ?
I note F1 on the Find method gets me nothing from MSDN Library which is disconcerting.
What ADO library have you got referenced (Project> references...) ?
Try simplifying the logic around your search string tr, I don't see the need for UCase as the search is not case sensitive by default and there's no need to test len(tr) because if it's blank your EOF test will handle the problem. I always try to code KISS (Keep It Simple Stupid).
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
Are you sure the control is pointing to the same directory and file path as it does on your own computer?
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
That would error before you reached the call to the find method.
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
Hmn.... ok. And You are sure that the .mdb is the same one that you are using at home, and not corrupted in any way? (I know it seems like simple stuff, but the best of us forget the simple stuff some times)
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
It should either not work on both, or work on both.... have you tried copying the from home and bringing it to the school? (instead of the recreation)
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
Would you be willing to zip up your college proj files (the ones erroring) and mail them to me?
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
Hi,
Ok try this syntax
Take an variable of type serch data.
dim str as string
Now take an inputbox code as follows
str = inputbox ("Enter Name","Search")
then,put statement as follows
adodc1.recordset.find "='"& str &"'"
if the searching record is a Number type then type as follows
adodc1.recordset.find "='"& val(str) &"'"
then put condition to check record found or not
if adodc1.recordset.eof then
msgbox "Record not found"
else
text1.text = adodc1.recordset.fields(0)
text2.text = adodc1.recordset.fields(1)
endif
Remember that the value of fields is order by it is actual in database
hell_tej
Junior Poster in Training
53 posts since Apr 2008
Reputation Points: 15
Solved Threads: 3