+ Reply to Thread
Results 1 to 9 of 9

VBA / Macro help needed for pupulate records in forms based on two combobox seletion

  1. #1
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Question VBA / Macro help needed for pupulate records in forms based on two combobox seletion

    Hi Folks,

    Please help me to fix the below issues;

    1. Show only unique values (No duplicate records) in “mySelector2” combobox which is placed in “tblEchanger” form (please note that “tblEchanger” is the main form).
    2. Once I selected any record in “mySelector2” combobox then I need to show all relevant records as mentioned in the form (“tblEchanger”).
    3. By clicking on “View Spares” button I want to show the all relevant spares list thru form “SparesList”
    4. Once the “SparesList” form open when I click on any one of the “Dimension” record then I want to show the common spares list against “TAG Number” (Some sapres are common for some "TAG Number")

    I have attached the database file of what I'm trying to accomplish.

    I was trying this last two days, but unfortunately I could not.


    Thanks in advance for your expertise!
    Attached Files Attached Files
    Last edited by krjoshi; 10-08-2013 at 12:58 PM.
    Cheers,

    Joshi
    Being with a winner makes you a winner

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,903

    Re: VBA / Macro help needed for pupulate records in forms based on two combobox seletion

    I think I have provided you with the results you are looking for in steps 1-3. I don't understand what you are trying to do in step 4.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro help needed for pupulate records in forms based on two combobox seletion

    Hi Alan,

    Thank you so much for your help and time. Regarding step 4, some spares are indentical (Last six columns in the table) for some "TAG Number" if I click the "Dimension" then I need to filter that particular spare and show the relavent "TAG Number" and "Asset" so that the user can understand these spares are using or common for these "TAG Number"s. Please advise.

    Thank you so much once again.
    Last edited by krjoshi; 10-08-2013 at 10:29 PM.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,903

    Re: VBA / Macro help needed for pupulate records in forms based on two combobox seletion

    I've never seen this type of action on a subform/query. I don't know how to do it, but will research over the next couple of days as I have time. Suggest you do the same using your favorite search engine and if you find a solution, please post it. In the meantime, can you give an example using one of the dimensions in your db and advise what the output would look like in your example (you will have to do it manually) so I fully understand what the outcome would look like. Right now, I am not sure and need clarification.

  5. #5
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro help needed for pupulate records in forms based on two combobox seletion

    Hi Alan,

    Please note that now only I checked the database and when I change "mySelector2" the relevant records not changing in "tblExchanger" form.
    ( Step 2. Once I selected any record in “mySelector2” combobox then I need to show all relevant records as mentioned in the form (“tblEchanger”).

    Please advise.
    Last edited by krjoshi; 10-08-2013 at 11:45 PM.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,903

    Re: VBA / Macro help needed for pupulate records in forms based on two combobox seletion

    That is because the results are showing in the form spareparts. tblExchanger is bound to the table tblExchanger. If you want the records to appear there, then you need to change that property. And wouldn't that be the same as what you get when you see spare parts?

    I am now even more confused by your request.

  7. #7
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro help needed for pupulate records in forms based on two combobox seletion

    Hi Alan,

    As advised by you for step 4, please see the attached picture which I need to show the result.

    Thanks in advance.
    Attached Images Attached Images

  8. #8
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro help needed for pupulate records in forms based on two combobox seletion

    Alan,

    I am really sorry for that.
    I am now even more confused by your request.
    Only one thing I need since step 4 no longer required. The mySelector2 still showing duplicate records. Please advise how I do fix that.


    Thanks,
    Joshi
    Last edited by krjoshi; 10-09-2013 at 05:16 AM.

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,903

    Re: VBA / Macro help needed for pupulate records in forms based on two combobox seletion

    In the file I uploaded, myselector2 uses a different sql statement to identify the tag numbers than you had. It has no duplicates. I see now that what you are trying to do is use the myselector2 combo box for two functions. I don't think that you can do that. If you want to filter on the tag number you need to do that in one form and if you want to run spare parts, then you will need to do that on a separate form with a different combo box or at least a different combo box on the same form (although I think I may have tried this in the past and it failed. You will need to experiment.)

+ 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. How to print rows as Forms or Records
    By tmb in forum Excel General
    Replies: 5
    Last Post: 02-05-2017, 09:33 PM
  2. [SOLVED] New to Forms-Display a blank combobox but have one column in it restricted to a combobox?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-14-2013, 09:04 PM
  3. VBA/Macro help needed for countif records by weekly
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-27-2013, 08:50 AM
  4. Seletion of unknown range in EXCEL using macro
    By keshav in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2007, 06:35 AM
  5. Forms ComboBox
    By cmpcwil2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-20-2006, 11:50 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