Results 1 to 8 of 8
  1. #1
    TallSA is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    8

    Showing part of the combobox values when button is clicked

    Hi All,



    I have combobox in different forms in my database show these values (-4,0,2w,1,2,...,36). I would like to be able to show only part of these values when button is clicked. for example, in my main form if I clicked (-4 button) I would like to see only -4 in the combobox, and if I clicked (1,3,5,7 button) I would like to see only these values (1,3,5,7) in the combobox.


    Thank you for your help in advance.

    Regards,

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    this makes no sense. the whole point of the combo box is to pick the value.
    Now you want to pick a value (from a button) to then pick the value from the combo too. (double the work)
    you dont need the button.
    or
    a double combo,
    like picking a state in the box
    then pick the city of that state in another box.
    is this what you need?
    for this you want 2 combos, using queries. Buttons cant use queries.

  3. #3
    TallSA is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    8
    Hi Ranman256

    Thank you for your reply.

    When you click on the button, it open series of forms, with the combobox in these forms (so not double the work as you stated).

    I would just like to make it easier to the user not to go through all the combobox values, instead go through only the values that he only needed now.

    Regards,

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Why don't you adjust the rowsource of the combo based on the form being opened?

  5. #5
    TallSA is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    8
    Hi Orange,

    Do you mean that, creating different queries for the rowsource based of the form being opened?

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Yes, or, depending on what you are doing/need, you could alter the criteria to show only those data relevant to the current situation.

  7. #7
    TallSA is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    8
    How can alter the criteria to show only those data relevant to the current situation?

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

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

Similar Threads

  1. Saving a Record Edit ONLY if button is clicked?
    By McArthurGDM in forum Forms
    Replies: 3
    Last Post: 06-01-2015, 09:33 PM
  2. Replies: 2
    Last Post: 01-11-2015, 11:45 PM
  3. Replies: 8
    Last Post: 11-21-2014, 04:39 PM
  4. Replies: 1
    Last Post: 07-13-2012, 09:13 AM
  5. disabling an enabled button that has been clicked.
    By aaron47 in forum Programming
    Replies: 3
    Last Post: 08-26-2011, 09:49 AM

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