Solved

Assign Drop Down list value to textbox Visual Basic

Posted on 2009-05-04
1
545 Views
Last Modified: 2013-11-25
I have an ad sales application that has a series of checkboxes.  One checkbox asks the sales rep if the order is a multiple company listing.  If it is the following information fires:  I need to somehow get the value of the dropdown list      ddMultipleRate.SelectedValue = "47" to also show in the textbox         (  txtMultipleRate.text )


    Protected Sub txtMultiple_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtMultiple.CheckedChanged
        If txtMultiple.Checked = True Then
            lblSecondary.Text = "Secondary Company Name:"
            lblSecondary.ToolTip = "Enter in Secondary company name as it is to be shown in directory/web"
            lblMultipleIn.Visible = True
            txtMultipleIn.Visible = True
            lblMultipleRate.Visible = True
            ddMultipleRate.Visible = True
            ddMultipleRate.SelectedValue = "47"
            txtMultipleRate.Visible = True
            lblMultipleOverride.Visible = True
            txtMultipleRateOverride.Visible = True


        Else
            lblSecondary.Text = "Other Advertiser:"
            lblSecondary.ToolTip = "Not Exhibiting or sharing a booth, list company name"
            lblMultipleIn.Visible = False
            txtMultipleIn.Visible = False
            lblMultipleRate.Visible = False
            ddMultipleRate.Visible = False
            txtMultipleRate.Visible = False
            lblMultipleOverride.Visible = False
            txtMultipleRateOverride.Visible = False
        End If
    End Sub
0
Comment
Question by:Albee_J
1 Comment
 
LVL 7

Accepted Solution

by:
talker2004 earned 500 total points
ID: 24297755
Private Sub ComboBox1_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectionChangeCommitted
        Dim cbo As ComboBox
        cbo = sender

        Me.TextBox1.Text = cbo.SelectedItem


    End Sub
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question