Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto-starting combo boxes

Status
Not open for further replies.

ajpa

Programmer
Jan 31, 2002
52
GB
Is there something one can call from the LostFocus or Valid methods of a text box that will both transfer focus to a combo box and also make it think that someone has pressed the down arrow? I'd like the user to enter filtering details into the box, and for the list from which he is to select to appear if he presses the return key. (I've read the FAQs on Combo boxes, but the solutions there are a bit more general and sophisticated than I need.)

(In version 2 one used to be able to stuff the keyboard buffer, which would then empty itself as soon as the next control got the focus. Perhaps there is a keypress to simulate pressing the down arrow?)

ajpa
 
Hi
In the combos gotfocus event,
KEYBOARD '{F4}'

In the lostfocus of the textbox
ThisForm.Combo1.SetFocus()

Of late, this COMBO box auto drop down has been answered several times by me. Is it part of school project ?



ramani :)
(Subramanian.G)
 
ramani,

[bigsmile] - I was beginning to think the same thing.

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Ramani -- no, not a school project -- nice guess though -- we're working independently of each other .... sometimes it's not easy to know what keywords to use in a search for previous answers, so we end up repeating an earlier question using different words.

Jim Nelson
 
Ramani

Not a 'school project' in that sense from me either - though I do work in a school, and this project is for use in the school. I haven't used the forum for a month or two, and so hadn't seen the earlier correspondence: sorry. As I said, I did look in FAQ first! And at least I came within "{F4}" of the right answer.

Anyway, thank you very much. The forum scores again.

Tony Ayres
 
faq184-118

I was surprised to find that there is a FAQ on this, as I was just about to suggest that ramani write one given the number of inquiries.


Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Well, he still could, since his solution is much shorter!

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top