Writing to a text box

Posted on 2004-11-09
Last Modified: 2010-05-02
On an order form I have 2 combo boxes, one with product, and the other with desription. The description combo box requerys after the product combo update. I have a text box that I want the value from the product and description box to go to. I want them side by side eg. literature-leaflets, and there are only five lines in the text box.
Question by:sarah_cosgrove
    LVL 5

    Assisted Solution


    To get the TextBox to contain the contents of the two combos you would do ...

    txtProductDescription.Text = cboProduct.Text & " - " & cboDescription.Text

    This code should be in the click event of both combos.  Am guessing your combos are set to be dropdown lists rather than actual combos?

    Not sure what relevance the 'only has 5 lines' is though?
    LVL 8

    Accepted Solution

    Hope the following helps...
    Make the text box property Multiline = true and you can add multiple entries into the text box.

    LVL 1

    Expert Comment


       since the description changes when u click the product u can try this

    private sub cbDescription_change()

    txtProductDescription.Text = cbProduct.Text & " - " & cbDescription.Text

    end sub

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    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…
    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…

    759 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

    10 Experts available now in Live!

    Get 1:1 Help Now