locked
dropdown box submenu in microsoft access RRS feed

  • Question

  • Dear expert,

    Is there any way to create dropdown combobox like this image below:


    Mir Abzal Ali

    Friday, August 29, 2014 11:46 AM

Answers

  • You can in Desktop base get very close to your example.

    This is a LookUp cbo from the looks of it. You can either use the Wizard to walk through the setup or you can manually set it up. Depending on the Version of Access you are using.

    1. Open the Form in Design View
    2. Ensure the Wizard is active (you can tell by the fact it is highlighted Orange or Yellow)
    3. Choose the Combo Box Icon in the Fluent UI Ribbon
    4. Click on the Form where you want it to be. The Wizard opens here.
    5. Follow the steps in the Wizard
    6. I want the cbo to get the values from another Table
    7. Select the Source Table for the Values
    8. Choose the Fields you want to show in the Order you wish them to appear
    9. Choose the Sort Column and either Ascending or Descending
    10. Probably should hide the Key column if selected and you can manipulate Column Width by dragging
    11. Remember the Value for later use.
    12. Change your Label Name for the cbo control, Finish.
    13. That completes a basic setup and note the following in the Property Sheet...
    14. Data Tab, Row Source is a Select Query - Review by Clicking the (...)
    15. Row Source is Table/Query
    16. Bound Column = 1
    17. Limit to List = Yes
    18. Other Tab change the name to something meaningful and set the Tab Index how it fits your db needs for data flow (Really good for keyboarders) Tab Stop Yes usually
    19. Format Tab - Columns Count, How many you want displayed
    20. Column Widths in Inches or Centimeters depends on your local settings. 0";1";1.5";2" as an example.
    21. Column Heads = Yes I think is good so people can tell what they are
    22. List Rows = the number of rows you want displayed at a time (I Like 16)
    23. List Width should be equal to or slightly larger than all your Column Widths added together
    24. Width = I like it to either be the same as the List width unless I am returning values to a group of Fields below it, where I then stack it above the cluster of Textboxes be filed in. See screen shot of example below.

    Let us know if you have more questions.


    Just takes a click to give thanks to someone whose post helped or answered your question. Please vote “Helpful” or Mark as “Answer” as appropriate. Chris Ward - Microsoft Community Contributor 2012 Award

    Friday, August 29, 2014 2:37 PM

All replies

  • Good Morning Abzal,

    Will this be for a client side App or a Web App?


    Just takes a click to give thanks to someone whose post helped or answered your question. Please vote “Helpful” or Mark as “Answer” as appropriate. Chris Ward - Microsoft Community Contributor 2012 Award

    Friday, August 29, 2014 1:22 PM
  • Good Morning Sir,

    This client side App, build with Microsoft Access VBA (Desktop base) not Web App.

    Thanks

    Mir


    Mir Abzal Ali

    Friday, August 29, 2014 1:32 PM
  • You can in Desktop base get very close to your example.

    This is a LookUp cbo from the looks of it. You can either use the Wizard to walk through the setup or you can manually set it up. Depending on the Version of Access you are using.

    1. Open the Form in Design View
    2. Ensure the Wizard is active (you can tell by the fact it is highlighted Orange or Yellow)
    3. Choose the Combo Box Icon in the Fluent UI Ribbon
    4. Click on the Form where you want it to be. The Wizard opens here.
    5. Follow the steps in the Wizard
    6. I want the cbo to get the values from another Table
    7. Select the Source Table for the Values
    8. Choose the Fields you want to show in the Order you wish them to appear
    9. Choose the Sort Column and either Ascending or Descending
    10. Probably should hide the Key column if selected and you can manipulate Column Width by dragging
    11. Remember the Value for later use.
    12. Change your Label Name for the cbo control, Finish.
    13. That completes a basic setup and note the following in the Property Sheet...
    14. Data Tab, Row Source is a Select Query - Review by Clicking the (...)
    15. Row Source is Table/Query
    16. Bound Column = 1
    17. Limit to List = Yes
    18. Other Tab change the name to something meaningful and set the Tab Index how it fits your db needs for data flow (Really good for keyboarders) Tab Stop Yes usually
    19. Format Tab - Columns Count, How many you want displayed
    20. Column Widths in Inches or Centimeters depends on your local settings. 0";1";1.5";2" as an example.
    21. Column Heads = Yes I think is good so people can tell what they are
    22. List Rows = the number of rows you want displayed at a time (I Like 16)
    23. List Width should be equal to or slightly larger than all your Column Widths added together
    24. Width = I like it to either be the same as the List width unless I am returning values to a group of Fields below it, where I then stack it above the cluster of Textboxes be filed in. See screen shot of example below.

    Let us know if you have more questions.


    Just takes a click to give thanks to someone whose post helped or answered your question. Please vote “Helpful” or Mark as “Answer” as appropriate. Chris Ward - Microsoft Community Contributor 2012 Award

    Friday, August 29, 2014 2:37 PM