473,322 Members | 1,566 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,322 software developers and data experts.

Set selected item in combo box

How do I programmatically select an time in a combo box? I can set the text
but it does not automatically set the selected property. There is a
SetCurSel() method but I don't know what the index of the item I want to
select(or how to find it).

Thanks
Sep 27 '07 #1
2 6580
>How do I programmatically select an time in a combo box? I can set the text
>but it does not automatically set the selected property. There is a
SetCurSel() method but I don't know what the index of the item I want to
select(or how to find it).
Tim,

When you insert the text into the list, you should be returned the
index value.

Dave
Sep 27 '07 #2
I found it. FindString() and SetCurSel() does it.

Thanks

"Tim Kelley" <tk*****@company.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
How do I programmatically select an time in a combo box? I can set the
text but it does not automatically set the selected property. There is a
SetCurSel() method but I don't know what the index of the item I want to
select(or how to find it).

Thanks

Sep 27 '07 #3

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

Similar topics

1
by: Donna Sabol | last post by:
I have a form (frm_MAIN_RPT) that contains a combo box (Combo6) & subform (dbo_REQ_subform). The combo box is used to select the "cost center" data that will be displayed in the subform. From...
3
by: RC | last post by:
I have a form where the user enters the Model info. The user picks the Model from either a combobox or listbox which both are filled from the Models table. If the Model type isn't in the boxes,...
1
by: ree | last post by:
I have two combo boxes on a dialog window. The aim is to check the the strings of the items. But if no items are selected then this line crashes the program. if...
2
by: Stephen Miller | last post by:
When I dynamically populate a HtmlSelect combo box, the Value property consistently fails to return the item selected, defaulting instead to the first item in the list. For example: Protected...
2
by: Brian Henry | last post by:
say I have a databound combo box, which allows for text entry still (DropDownStype = DropDown in this case). now, If the user doesn't enter manually an item in the data bound list, nothing...
2
by: B | last post by:
I'm trying to simply build a form with a combo box containing a list of states. I'd like for there to be NO default selected item, but invariably, the first item in the DataSource is being...
6
by: Smokey Grindle | last post by:
Say I have a combo box with the following simple object Public class MyObject public ID as integer public Name as string public overrides sub ToString() as string return name end sub end...
16
Ranjan kumar Barik
by: Ranjan kumar Barik | last post by:
Hello !!! I am Ranjan. can the selected item of a combo box be displayed on the same page. I mean when I just click the item of a combo box it will atonce displayed on the page. Thanks !!!
3
by: mlevit | last post by:
Hi, I need to obtain the value of the selected item from a combo box. BEGIN IF :LOGIN_BLOCK.USER_TYPE = 'Student' THEN :GLOBAL.student_id := :LOGIN_BLOCK.ID;...
2
by: Hanny J | last post by:
I am making a database for a dress shop, which hires and sells prom dresses. I am creating a form where the user selects the customer using a list box and then using a combo box to select a dress....
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.