Access databases and VB

Moderators: Gogi
Number of threads: 767
Number of posts: 1599

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
find method for database search Posted by micks_gupta on 2 Mar 2006 at 3:18 AM
friends, i am making a package in which i want to search in a database.
on my form i have a find button.
i want to use find method of vb.
like
Adodc1.Recordset.Find "Addcity like 'New Delhi'
it works but i want to accept value from user
thru

dim getdata as string
getdata=inputbox("Enter city","search",0)
Adodc1.Recordset.Find "Addcity like 'New Delhi'"

i recieve value in getdata variable.
but i am unable to search value stored in getdata?
how to go abt it?

plz help

micks

Report
Re: find method for database search Posted by zaib_awan on 2 Mar 2006 at 5:28 AM
: friends, i am making a package in which i want to search in a database.
: on my form i have a find button.
: i want to use find method of vb.
: like
: Adodc1.Recordset.Find "Addcity like 'New Delhi'
: it works but i want to accept value from user
: thru
:
: dim getdata as string
: getdata=inputbox("Enter city","search",0)
: Adodc1.Recordset.Find "Addcity like 'New Delhi'"
:
: i recieve value in getdata variable.
: but i am unable to search value stored in getdata?
: how to go abt it?
:
: plz help
:
: micks
:
:



Use this
Adodc1.Recordset.requery
Adodc1.Recordset.Find "Addcity like '" & trim(getdata) & "'"


Report
Re: find method for database search Posted by micks_gupta on 3 Mar 2006 at 1:41 AM
: : friends, i am making a package in which i want to search in a database.
: : on my form i have a find button.
: : i want to use find method of vb.
: : like
: : Adodc1.Recordset.Find "Addcity like 'New Delhi'
: : it works but i want to accept value from user
: : thru
: :
: : dim getdata as string
: : getdata=inputbox("Enter city","search",0)
: : Adodc1.Recordset.Find "Addcity like 'New Delhi'"
: :
: : i recieve value in getdata variable.
: : but i am unable to search value stored in getdata?
: : how to go abt it?
: :
: : plz help
: :
: : micks
: :
: :
:
:
:
: Use this
: Adodc1.Recordset.requery
: Adodc1.Recordset.Find "Addcity like '" & trim(getdata) & "'"
:
: thnx it worked
:




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.