Solved

Assign Drop Down list value to textbox Visual Basic

Posted on 2009-05-04
1
556 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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…

730 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