By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,279 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Creating search function

P: 14
Hello there..need help how to create search function in text box to search records from access database using vb6..thanks a lot
Jan 2 '08 #1
Share this Question
Share on Google+
5 Replies


debasisdas
Expert 5K+
P: 8,127
kindly post what you have tried as of now.
Jan 2 '08 #2

P: 14
I am trying to create a search function in which if i input string in text box such as
Macapagal as surname then it will show all the lists from table1 in access showing those records having a surname Macapagal.Those record will show in datagrid.
Jan 2 '08 #3

100+
P: 274
It not a very tough to design a simple search module:
There are many different ways to do this one of the example is as following.

1.Use a textbox to enter the string you want to search
2.Add a command button for search purpose(you can work without this too)
for search button write a dynamic query like this
query= "select * form TABLE_NAME where Surname=' "& Text1.Text & " ' "
3. Use you connection and connection string to get results and assign results
to your grid.(A assume you know about this already)

If you try this and post you code here. Someone can help you.

Kind Regards
Jan 2 '08 #4

debasisdas
Expert 5K+
P: 8,127
I am trying to create a search function in which if i input string in text box such as
Macapagal as surname then it will show all the lists from table1 in access showing those records having a surname Macapagal.Those record will show in datagrid.
I have asked you to post what you have tried so far.

Refer post #2 and post here the same for further discussion.
Jan 2 '08 #5

P: 14
Expand|Select|Wrap|Line Numbers
  1. Private Sub Text1_Change()
  2. DE.searchBookCode Text1 & "%", Text1 & "%", Text1 & "%"
  3. DataGrid1.DataMember = "searchbookcode"
  4. DE.rssearchBookCode.Close
  5. End Sub
this is my code using data environment in search function.How do I convert it in ADO Codes?
Jan 3 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.