•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 427,326 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,967 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 22383 | Replies: 15
![]() |
•
•
Join Date: Feb 2005
Location: Braintree, UK
Posts: 1,165
Reputation:
Rep Power: 7
Solved Threads: 59
•
•
Join Date: Apr 2008
Posts: 22
Reputation:
Rep Power: 1
Solved Threads: 0
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 "<Field name>='"& str &"'"
if the searching record is a Number type then type as follows
adodc1.recordset.find "<Field name>='"& 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
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 "<Field name>='"& str &"'"
if the searching record is a Number type then type as follows
adodc1.recordset.find "<Field name>='"& 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
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: Hello....... Code Masters
- Next Thread: final project



Linear Mode