+ Reply to Thread
Results 1 to 7 of 7

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

  1. #1
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    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
    MS 365 Office Suite.
    Posts
    8,448

    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.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    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
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    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
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    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
    MS 365 Office Suite.
    Posts
    8,448

    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
    https://t.me/pump_upp
    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)

Similar Threads

  1. [SOLVED] Auto populate textbox value based on combobox value
    By justin1202 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-30-2015, 04:01 AM
  2. Textbox to populate based on combobox selection
    By acroley1 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-11-2015, 04:12 PM
  3. automatically populate form based on combobox selection
    By zak.horrocks in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-15-2014, 10:16 AM
  4. Populate textbox based off ComboBox Selection
    By ladams41 in forum Excel General
    Replies: 1
    Last Post: 04-09-2014, 10:13 AM
  5. Populate TextBox based off ComboBox selection
    By ladams41 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2014, 01:24 PM
  6. [SOLVED] Excel Userform: Populate other controls (i.e. textbox & combobox) based on combobox select
    By MileHigh_PhD in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2013, 04:50 PM
  7. Test combobox entry to populate next textbox in same form
    By regupnorth in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2012, 02:22 PM

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