none
Combo Box item removal RRS feed

  • Question

  • I've got a form and subform (one to many relationship) and within the subform I have a combo box (and other fields) called Fltmember that lists current members in the dropdown. The subform record source is based off a "members" table.  Also in the members table I have a yes/no field called "Flyer" which you would check if that members is a current flyer or uncheck if they are not.  My row source for the subform field Fltmember combo box has the "Flyer" yes/no field criteria set for "true" so it will display all current flyers when you select the combo box dropdown or remove them if it is unchecked (sslecting and deselecting is done from another separate form). 

    Now to the problem/question, the problem I have is that when I uncheck the Flyer field to remove a flyer from the combobox dropdown it does remove the Fltmember from the combo box dropdown listing but it also removes the fltmember name (leaves a blank space) from any other records where that member was selected in other subform records.  What I'm wanting to do is just have the fltmember removed from the combo box field and not any other records where their name was selected in previous records.  Hopefully I explained my situation ok and would appreciate any assistance.


    TAK

    Friday, September 9, 2016 9:59 PM

Answers

  • Take a look at ActiveEmployee.zip in my public databases folder at:

    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169

    Note that if you are using an earlier version of Access you might find that the colour of some form objects such as buttons shows incorrectly and you will need to amend the form design accordingly.  

    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.

    This little demo file illustrates the use of a 'hybrid' control of the sort suggested theDBguy.

    Ken Sheridan, Stafford, England

    • Proposed as answer by David_JunFeng Sunday, September 18, 2016 1:59 PM
    • Marked as answer by David_JunFeng Monday, September 19, 2016 5:25 AM
    Sunday, September 11, 2016 2:10 PM

All replies

  • Hi,

    This is a known issue, and there are several workarounds for it. Is your subform a single or continuous view form?

    The simplest approach is to not filter the combobox items but just validates the selected item to make sure the user did not select a non-flyer. Filtering the combo but still showing filtered data takes a bit of a setup and possibly some code.

    Just my 2 cents...

    Friday, September 9, 2016 10:51 PM
  • The subform is a continuous view form.

    TAK

    Saturday, September 10, 2016 3:31 PM
  • Okay, another possible approach is to overlay a textbox bound to the same field on top of the combobox without covering the dropdown arrow. 

    Hope it helps...

    Saturday, September 10, 2016 3:45 PM
  • Take a look at ActiveEmployee.zip in my public databases folder at:

    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169

    Note that if you are using an earlier version of Access you might find that the colour of some form objects such as buttons shows incorrectly and you will need to amend the form design accordingly.  

    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.

    This little demo file illustrates the use of a 'hybrid' control of the sort suggested theDBguy.

    Ken Sheridan, Stafford, England

    • Proposed as answer by David_JunFeng Sunday, September 18, 2016 1:59 PM
    • Marked as answer by David_JunFeng Monday, September 19, 2016 5:25 AM
    Sunday, September 11, 2016 2:10 PM
  • I downloaded the file and will let you know how it goes.  Thanks for the demo file!  This is the way I'm hoping it will work.  I just need to make sure I set things up accordingly.

    TAK

    Monday, September 12, 2016 4:31 PM
  • Sorry it took awhile to reply!  Thank you for the sample dbase and suggestions.  It does work.

    TAK

    Monday, September 19, 2016 1:09 PM