Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Assign Drop Down list value to textbox Visual Basic

Posted on 2009-05-04
1
Medium Priority
?
577 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

963 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