473,385 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to Search ? HELP PLEASE

Hi
basically i got a program in VB6 that can read in and store information on employees and it can read these back out to a set up form , i have navigation buttons
but i need a search feature and a way to show this on screen, how wouldi go about this , i dont really have a clue been looking but not found any thing , also how do i print the whole txt file and then the information searched i know it had so to with the

Print . function
Mar 11 '08 #1
6 983
jeffstl
432 Expert 256MB
Hi
basically i got a program in VB6 that can read in and store information on employees and it can read these back out to a set up form , i have navigation buttons
but i need a search feature and a way to show this on screen, how wouldi go about this , i dont really have a clue been looking but not found any thing , also how do i print the whole txt file and then the information searched i know it had so to with the

Print . function

You said the program reads in information.

In order to do a search you would just have to read in the same information except using the parameter entered in a search text box for your SQL.

Then re-populate the Recordset you are using to read in now with this filtered data.

I assume this makes sense? Are you using SQL or are you binding the form to a data control? If you are you can adjust the SQL of that specific data control to be filtered too.
Mar 11 '08 #2
Killer42
8,435 Expert 8TB
...I assume this makes sense? Are you using SQL or are you binding the form to a data control?
My guess would be neither. If you look closely, I think the original post says the info is being stored in a text file.

Or have I got that backwards, Yamasassy?
Mar 12 '08 #3
gobblegob
133 100+
hi ,
If you are loading the text you want to search into a textbox you can use this...

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_Click()
  2.     Dim Search, Where
  3.     ' Get search string from user.
  4.         Search = Text2.Text
  5.     ' Find string in text.
  6.     Where = InStr(Text1.Text, Search)
  7.     If Where Then
  8.         Text1.SetFocus
  9.         Text1.SelStart = Where - 1
  10.         Text1.SelLength = Len(Search)
  11.     Else
  12.         MsgBox "String not found."
  13.     End If
  14. End Sub
GobbleGob.
Mar 12 '08 #4
My guess would be neither. If you look closely, I think the original post says the info is being stored in a text file.

Or have I got that backwards, Yamasassy?
yeah the info is being saved in to a text file ,
yamasassy
Mar 12 '08 #5
debasisdas
8,127 Expert 4TB
You want to search and navigate the record from a text file ?
Mar 12 '08 #6
You want to search and navigate the record from a text file ?
i got that navigate bit working , just really confused about how to search

i have my text file set up going accross the screen insted of down
Yamasassy
Mar 12 '08 #7

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

Similar topics

5
by: David | last post by:
Hi, I'm trying to add a search facility to a page that looks for matches in one, other or both memo fields of a database. The code below works fine if the visitor types in one word, or the term...
83
by: D. Dante Lorenso | last post by:
Trying to use the 'search' in the docs section of PostgreSQL.org is extremely SLOW. Considering this is a website for a database and databases are supposed to be good for indexing content, I'd...
3
by: RiceGuy | last post by:
Hi! I'm looking for ideas on what would the best approach to design a search system for a RSS feeds. I will have some 50 RSS feeds (all RSS 2.0 compliant) stored locally on the web server. Now I'm...
1
by: Eric | last post by:
Hi: I have two files. I search pattern ":" from emails text file and save email contents into a database. Another search pattern " field is blank. Please try again.", vbExclamation + vbOKOnly...
3
by: ZafT | last post by:
Thanks for any help in advance. I am using this exact same piece of code on a server running PHP4, but for some reason when I run it on dreamhost using PHP5, the search does not register and it...
2
by: eSolTec, Inc. 501(c)(3) | last post by:
Thank you in advance for any and all assistance. Is there a way to start, pause and resume a recurrsive search exactly where you left off, say in the registry programmatically? -- Michael Bragg,...
1
by: cglewis03 | last post by:
Hello, I am trying to build a search form with several different options to choose from. Currently it is set up to open within the same window if a single option is selected and open within a...
10
by: jonathan184 | last post by:
Hi I tried getting this to work through dreamweaver but it did not. So i found a n example on the internet , i followed everything exactly the search script does not work. Could somebody help me...
1
by: Ken Fine | last post by:
I have set up Microsoft Search Server 2008 Express. I want to know how I can query against it and return results in a form that can be bound to ASP.NET controls like ListViews. If there's simply...
12
by: iahamed | last post by:
Hi Everyone, I got two parts of my advance search to work, I am running out of Logic to connect the third. My mind is in swing! Pleaseeeeeeeee Help me. I have 3 Fiels to search, the First two...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.