+ Reply to Thread
Results 1 to 7 of 7

Populate automatically a textbox based on value within a Combobox on a form

  1. #1
    Registered User
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    14

    Populate automatically a textbox based on value within a Combobox on a form

    Hello,

    I need some help from the experts please. I appreciate that 1 form.PNGmy question has already been raised several times but I could not find the real code that would make my project work. Hence my request for help from you.

    The objective: I would like to be able to auto-populate the 'Assigned to' field with the corresponding value as soon as the field 'Supplier Name' is selected on the Supplier Details section of the form, which is dependent on the 'Product or service' field on the Lead Details section of the form.

    The issue: I managed to find a way to work out the procedure from 'Product or Service' to 'Supplier Name' without a big issue. And every time I change the value of 'Product or Service' automatically 'Supplier Name' changes to corresponding options.
    However, the code doesn't necessarily work when it comes to 'Assigned to' procedure because as soon as it assign one value, that value will also stays there although I selected different value from either 'Supplier Name' or 'Product or Service'.
    The problem here is that, let's suppose the value selected in the field 'Supplier Name' was incorrect. If I then change that value to the correct one, 'Assigned to' field will retain the previous value allocated there from the incorrect value of 'Supplier Name'

    Possible Solution: I assume, I should clear that field every time the value of 'Supplier Name' changes but unsure how to do that. Also, I'm sure there is a better way to execute this event from a simpler code, though this is only an assumption.

    Any help from you is greatly appreciated. Thank you very much

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    2013
    Posts
    5,496

    Re: Populate automatically a textbox based on value within a Combobox on a form

    Wow

    Your code looks like hard work.



    Yourb Code:-
    Please Login or Register  to view this content.

    How About:-

    Please Login or Register  to view this content.

    *************************************************************************************************

    Your Code

    Private Sub ComboBox7_Change()

    Please Login or Register  to view this content.


    How About:-

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 08-08-2017 at 12:57 PM.
    Please Avoid Joining My List Of Blocked Users by:

    Saying Please and Thank you.

    Making requests not demands.

    Checking back on your post. I will not edit any post after 4 days.

    Marking threads as closed once your issue is resolved. How? The tools at the top

    Any reputation (*) points appreciated. None of us gets paid here.

    If you found someone's input useful, please take a second to click the * at the bottom left to let them know

  3. #3
    Registered User
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Populate automatically a textbox based on value within a Combobox on a form

    Thank you Mehmetcik for your contribution

    I've used your suggestion but the auto-fill wasn't working on the TextBox24. Actually nothing is showing at all after you selected the proper value in the ComboBox12. May be I have missed something in replicating it.

    Best,

  4. #4
    Registered User
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Populate automatically a textbox based on value within a Combobox on a form

    Anyone may be able to look at this and provide some help please. Much appreciated.

  5. #5
    Registered User
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Populate automatically a textbox based on value within a Combobox on a form

    Hello, I have managed to work it a bit more but not very satisfied with the result. Somehow, the name Barry populates the field TextBox when no selection is on both ComboBoxes.

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    2013
    Posts
    5,496

    Re: Populate automatically a textbox based on value within a Combobox on a form

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  7. #7
    Registered User
    Join Date
    12-07-2017
    Location
    vietnam
    MS-Off Ver
    omf hospital
    Posts
    1

    Re: Populate automatically a textbox based on value within a Combobox on a form

    i need file demo, thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1