+ Reply to Thread
Results 1 to 5 of 5

Create userform with dependent combobox based on different tables

  1. #1
    Forum Contributor
    Join Date
    01-12-2021
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    118

    Create userform with dependent combobox based on different tables

    I want to have a userform where combobox2 "Description" is based on combobox1 "Funding". And combobox3 "Item" is based on combobox2 all in the SAME table (T_FUNDING).
    This I have help previously to achieve with thanks to members here!

    What I want do now is keep the above relationship between the comboboxes, but add an new relationship:
    If "stock" is selected in combobox2, then I want combobox3 NOT to refer to T_FUNDING table, but refer to column 1 in T_Stock table. And the related code to be column 2 in T_Stock.

    How do I do this?
    Attached Files Attached Files

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,411

    Re: Create userform with dependent combobox based on different tables

    Why not just put the word 'Stock' into both of the first two columns, I presume the following actions remain the same.
    Attached Files Attached Files
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  3. #3
    Forum Contributor
    Join Date
    01-12-2021
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    118

    Re: Create userform with dependent combobox based on different tables

    Good idea @torachan! I played with it and the userform and the table will functionally work doing this.
    However, this causes a problem with billing as "Stock" will replace the place where the Funding (or billing body) is. This means afterwards I will have to manually replace "stock" with the correct billing body. Any way around this?

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,411

    Re: Create userform with dependent combobox based on different tables

    seperate 'stock' combobox and seperate stock 'table' ????

  5. #5
    Forum Contributor
    Join Date
    01-12-2021
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    118

    Re: Create userform with dependent combobox based on different tables

    I think that could work too. I got around it by doing something that I don't think you will approve of?... I combined vba and formula. I used the userform as you suggested and added formula in the data table to pick up the funding body without the userform.

+ 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] Userform w/ dependent comboBox
    By LTSSB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2018, 07:50 AM
  2. Userform label dependent from combobox
    By Rui Farinha in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-13-2017, 11:51 AM
  3. [SOLVED] Dependent Combobox Userform
    By Frankinstyyn in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-15-2014, 03:21 PM
  4. [SOLVED] UserForm: ComboBox #2 dependent on ComboBox #1
    By TexasAggie12 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-25-2014, 10:41 AM
  5. [SOLVED] Userform with two combobox dependent on one combobox
    By bigfoot007 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-10-2012, 01:01 PM
  6. VBA Userform Dependent Combobox
    By TextMonkey in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-10-2011, 06:46 AM
  7. userform one combobox dependent on another
    By busydave in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-08-2010, 06:05 AM

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