Solved

Assign Drop Down list value to textbox Visual Basic

Posted on 2009-05-04
1
523 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now