473,396 Members | 2,037 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,396 software developers and data experts.

search in vb 6.0

Hello

I am still a newbie and I have an access dbase. I want to create a textbox
where i can type in the first letter of a name, so that the appropriate
names starting with the first letter will be shown. for example you type an
A you will get all the names starting with A in the datagrid box. How can i
do this?

Jeroen
Jul 17 '05 #1
2 4602
This works with a combo box so I see no reason you couldn't use it with
another control.

'Place the following in the declaration section of your form:

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA"
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As
Any) As Long
'Place the following function in your form code:

Public Function dropme(cb As Object)
Const CB_SHOWDROPDOWN = &H14F
Dim Tmp As String
Tmp = SendMessage(cb.hwnd, CB_SHOWDROPDOWN, 1, ByVal 0&)
End Function

'Now pass the function to the Combo box in the Get focus procedure.

Private Sub Combo1_GotFocus()
dropme Combo1
End Sub
"Jeroen van vliet" <in**@educationalstays.com> wrote in message
news:bj********@reader10.wxs.nl...
Hello

I am still a newbie and I have an access dbase. I want to create a textbox
where i can type in the first letter of a name, so that the appropriate
names starting with the first letter will be shown. for example you type an A you will get all the names starting with A in the datagrid box. How can i do this?

Jeroen

Jul 17 '05 #2
Thanks very much, but how do i use this for the textbox??
"MooVBuff" <ed*****@comcast.net> schreef in bericht
news:I_********************@comcast.com...
This works with a combo box so I see no reason you couldn't use it with
another control.

'Place the following in the declaration section of your form:

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA"
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As
Any) As Long
'Place the following function in your form code:

Public Function dropme(cb As Object)
Const CB_SHOWDROPDOWN = &H14F
Dim Tmp As String
Tmp = SendMessage(cb.hwnd, CB_SHOWDROPDOWN, 1, ByVal 0&)
End Function

'Now pass the function to the Combo box in the Get focus procedure.

Private Sub Combo1_GotFocus()
dropme Combo1
End Sub
"Jeroen van vliet" <in**@educationalstays.com> wrote in message
news:bj********@reader10.wxs.nl...
Hello

I am still a newbie and I have an access dbase. I want to create a textbox where i can type in the first letter of a name, so that the appropriate
names starting with the first letter will be shown. for example you type an
A you will get all the names starting with A in the datagrid box. How

can i
do this?

Jeroen


Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: R. Rajesh Jeba Anbiah | last post by:
Q: Is PHP search engine friendly? Q: Will search engine spiders crawl my PHP pages? A: Spiders should crawl anything provided they're accessible. Since, nowadays most of the websites are been...
1
by: Les Juby | last post by:
A year or two back I needed a search script to scan thru HTML files on a client site. Usual sorta thing. A quick search turned up a neat script that provided great search results. It was fast,...
5
by: George | last post by:
Hi, Anyone has the background for explaining? I have made a search on my name and I have got a link to another search engine. The link's title was the search phrase for the other search engine...
3
by: Alastair | last post by:
Hello guys, I've been building a search facility for an intranet site I'm part of developing and we've been building a search engine using Index Server. It mostly works, however there have been...
39
by: Noticedtrends | last post by:
Can inference search-engines narrow-down the number of often irrelevant results, by using specific keywords; for the purpose of discerning emerging social & business trends? For example, if...
22
by: Phlip | last post by:
C++ers: Here's an open ended STL question. What's the smarmiest most templated way to use <string>, <algorithms> etc. to turn this: " able search baker search charlie " into this: " able...
28
by: joshc | last post by:
If I have an array of data that I know to be sorted in increasing order, and the array is less than 50 elements, and I want to find the first element greater than a certain value, is a simple...
4
by: BenCoo | last post by:
Hello, In a Binary Search Tree I get the error : Object must be of type String if I run the form only with the "Dim bstLidnummer As New BinarySearchTree" it works fine. Thanks for any...
1
Merlin1857
by: Merlin1857 | last post by:
How to search multiple fields using ASP A major issue for me when I first started writing in VB Script was constructing the ability to search a table using multiple field input from a form and...
0
by: passion | last post by:
"Specialized Search Engines" along with Google Search Capability (2 in 1): http://specialized-search-engines.blogspot.com/ Billions of websites are available on the web and plenty of extremely...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.