Results 1 to 5 of 5
  1. #1
    Josec is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    3

    Filling multiple text boxes with different values based on multiple drop down menus.

    I've looked around the internet a bit already and can't seem to find an answer to my problem. I am new to access so I may be approaching this all wrong. I have 2 drop down menus ( "Panel" and "Inverter" for now ) that are populated from two different queries shown below (some values are arbitrary for now).



    Click image for larger version. 

Name:	Inverter Query.PNG 
Views:	15 
Size:	37.1 KB 
ID:	38552Click image for larger version. 

Name:	Panel Query.PNG 
Views:	15 
Size:	14.4 KB 
ID:	38553

    Click image for larger version. 

Name:	Help.PNG 
Views:	15 
Size:	8.1 KB 
ID:	38551

    What I want to do is have my first text box filled with the associated watt value for the panel in the "Panel" dropdown menu, and have the second text box filled with the cost. Two more text boxes will be added to do the same thing for the inverter drop down menu. More text boxes and drop down menus will be added later. Ultimately I am trying to have a list with the cost of all the components that will be selected as well as the wattage for components that I need to know the wattage for. I intend to do calculations with these numbers to finalize a cost based on watts and/or component cost. Apologies if I am confusing anyone. I am having difficulty wording this.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Make combobox RowSource multi-column. Expression in textbox references column index of combobox. Index begins with 0 so if value is in second column, index is 1.

    =[comboboxname].Column(1)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Josec is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    3
    Thank you so much! Its bittersweet knowing the solution was so simple. While I'm here I though I'd ask, how do you hide the second column (I only have 2, panel and watts) from being seen in the form?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    If you don't want column to display in the dropdown list use width of 0 - set ColumnWidth property, something like: 1";0"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Josec is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    3
    Thanks again

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Search Query Based on Multiple Combo / Text Boxes
    By ItsJustRey in forum Queries
    Replies: 5
    Last Post: 07-20-2016, 02:04 PM
  2. Replies: 4
    Last Post: 01-10-2016, 01:03 PM
  3. Replies: 12
    Last Post: 01-13-2015, 10:32 AM
  4. Replies: 3
    Last Post: 02-10-2013, 12:55 AM
  5. Replies: 2
    Last Post: 05-16-2012, 04:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums