• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

Searching through a database from visual basic

I am VERY new to visual basic and i am trying to write a program that searches my database. I have no clue at all how to do this, i have a text box and a search button but no coding. Can someone please help me get on my way of having this program work.
0
mrhell
Asked:
mrhell
  • 2
1 Solution
 
twalgraveCommented:
I recommend using the add-in called VB Data Form Wizard.  You can get to it from The add-ins...Add-in Manager.  This will build a DB form for you.  Now you can modify the code and change the SQL statement used to open the ADO recordset to do the search.

You will end up doing a SQL statement like:

sSQL = "Select * from MyTable where MYField = '" & text1.text & "'"
then you will refresh the data control or whatever you choose to create a recordset.
0
 
FaithRavenCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept twalgrave's comment
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

FaithRaven
EE Cleanup Volunteer
0
 
FaithRavenCommented:
Thanks mrhell for you colaboration :)

Yours,
   FaithRaven
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now