Click here to Skip to main content
15,888,461 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Specify absolute path in classic ASP script Pin
Dave Kreskowiak19-Jul-07 6:20
mveDave Kreskowiak19-Jul-07 6:20 
GeneralRe: Specify absolute path in classic ASP script Pin
dwreck_stg19-Jul-07 9:29
dwreck_stg19-Jul-07 9:29 
GeneralRe: Specify absolute path in classic ASP script Pin
Dave Kreskowiak19-Jul-07 10:06
mveDave Kreskowiak19-Jul-07 10:06 
QuestionAllowing user to add to/edit combobox Pin
GuyThiebaut19-Jul-07 3:20
professionalGuyThiebaut19-Jul-07 3:20 
AnswerRe: Allowing user to add to/edit combobox Pin
ciacia19-Jul-07 4:35
ciacia19-Jul-07 4:35 
GeneralRe: Allowing user to add to/edit combobox Pin
GuyThiebaut19-Jul-07 4:54
professionalGuyThiebaut19-Jul-07 4:54 
AnswerRe: Allowing user to add to/edit combobox Pin
Dave Kreskowiak19-Jul-07 6:12
mveDave Kreskowiak19-Jul-07 6:12 
AnswerRe: Allowing user to add to/edit combobox Pin
GuyThiebaut19-Jul-07 9:27
professionalGuyThiebaut19-Jul-07 9:27 
Thanks Dave and Ciacia,

I've solved it.

First thing I did was turn it into a DropDown rather than DropDownList. This allows the users to edit the dataD'Oh! | :doh:

Then I created the following event handlers:
<code>    Private Sub ComboBox2_SelectedTextChange(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.TextChanged

        textChanged = True

    End Sub

    Private Sub ComboBox2_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.Leave

        If textChanged Then

            ComboBox2.Items.Insert(ComboBox2.Items.Count, ComboBox2.Text)
            ComboBox2.SelectedIndex = ComboBox2.Items.Count - 1

        End If

    End Sub
</code>

Note: textChanged is declared as a boolean variable.
What happens then is that when the user leaves the combobox if they have changed any text: this is added to the end of the combobox array collection and this is then made the current selection.

Thanks for your help guys. It's a shame that something which seems so simple can be so tricky!Big Grin | :-D


You always pass failure on the way to success.

GeneralRe: Allowing user to add to/edit combobox Pin
ciacia20-Jul-07 5:43
ciacia20-Jul-07 5:43 
GeneralRe: Allowing user to add to/edit combobox Pin
Paul Conrad19-Jul-07 10:04
professionalPaul Conrad19-Jul-07 10:04 
QuestionBizTalk Pin
d_smit19-Jul-07 3:05
d_smit19-Jul-07 3:05 
AnswerRe: BizTalk Pin
Dave Kreskowiak19-Jul-07 3:55
mveDave Kreskowiak19-Jul-07 3:55 
AnswerRe: Share point Pin
Dave Kreskowiak19-Jul-07 3:52
mveDave Kreskowiak19-Jul-07 3:52 
QuestionStopwatch Pin
VB.NET_learner19-Jul-07 2:42
VB.NET_learner19-Jul-07 2:42 
AnswerRe: Stopwatch Pin
Sathesh Sakthivel19-Jul-07 2:45
Sathesh Sakthivel19-Jul-07 2:45 
AnswerRe: Stopwatch Pin
Paul .20-Jul-07 8:01
Paul .20-Jul-07 8:01 
Questionhow to create PDF in vb.net? Pin
phyrrix19-Jul-07 2:04
phyrrix19-Jul-07 2:04 
AnswerRe: how to create PDF in vb.net? Pin
Sathesh Sakthivel19-Jul-07 2:34
Sathesh Sakthivel19-Jul-07 2:34 
QuestionExtracting a single record from a SQL database Pin
aqzman_19-Jul-07 1:43
aqzman_19-Jul-07 1:43 
AnswerRe: Extracting a single record from a SQL database Pin
Colin Angus Mackay19-Jul-07 1:54
Colin Angus Mackay19-Jul-07 1:54 
GeneralRe: Extracting a single record from a SQL database Pin
aqzman_19-Jul-07 2:10
aqzman_19-Jul-07 2:10 
AnswerRe: help Pin
kubben19-Jul-07 1:46
kubben19-Jul-07 1:46 
Jokemore meaningful subject Pin
Luc Pattyn19-Jul-07 2:43
sitebuilderLuc Pattyn19-Jul-07 2:43 
GeneralRe: more meaningful subject Pin
kubben19-Jul-07 2:51
kubben19-Jul-07 2:51 
QuestionError when connecting to Ms access database Pin
Mekong River19-Jul-07 0:34
Mekong River19-Jul-07 0:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.