msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to collect user input in combo box ...

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB DOS
Author Message
budgie



Joined: 04 Oct 2007
Posts: 40

PostPosted: Fri Mar 31, 2006 1:22 am    Post subject: How to collect user input in combo box ... Reply with quote

Yep, me again with more problems Sad but at least this should be easy for you
gurus.

I have a combo box with numbers (say) 1-99 available in a drop-down for the
users to choose from. However I am having a problem finding a means to
handle/collect user input when the user types a number into the box rather than
drop'n'scroll. This is a data entry aka selection that I want to support.

Short of watching every keypress event and waiting for a , how can I get the
user's (usually two-digit) entry?

Thanks for any constructive suggestions.

Archived from group: microsoft>public>vb>dos
Back to top
View user's profile Send private message
Jonathan Rothwell



Joined: 04 Oct 2007
Posts: 7

PostPosted: Sun Apr 02, 2006 8:57 pm    Post subject: Re: How to collect user input in combo box ... Reply with quote

Dear Budgie,

> I have a combo box with numbers (say) 1-99 available in a drop-down for
> the
> users to choose from. However I am having a problem finding a means to
> handle/collect user input when the user types a number into the box rather
> than
> drop'n'scroll. This is a data entry aka selection that I want to support.

Try using the event YourComboBoxName_CHANGE. This works in text boxes, but
I've not yet tried it with a combo box.
Hope this helps.
Back to top
View user's profile Send private message
budgie



Joined: 04 Oct 2007
Posts: 40

PostPosted: Mon Apr 03, 2006 12:54 pm    Post subject: Re: How to collect user input in combo box ... Reply with quote

On Sun, 02 Apr 2006 16:57:38 GMT, "Jonathan Rothwell"
wrote:

>Dear Budgie,
>
>> I have a combo box with numbers (say) 1-99 available in a drop-down for
>> the
>> users to choose from. However I am having a problem finding a means to
>> handle/collect user input when the user types a number into the box rather
>> than
>> drop'n'scroll. This is a data entry aka selection that I want to support.
>
>Try using the event YourComboBoxName_CHANGE. This works in text boxes, but
>I've not yet tried it with a combo box.
>Hope this helps.

That was one thing I tried, but it responds to *each* keystroke so I would have
to "build" the result. Also it doesn't avoid the generating a beep and
nothing else. I couldn't see a way to achieve an end-of-user-input when the
key is pressed.

I wound up (after much trial-and-error ) using _KeyUp event to SETFOCUS to the
next tabbed control when the character code was 13 (return). Not elegant, but
it worked.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB DOS All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group