Showing combo box box that's not an option in its drop-down list

  • Thread starter Thread starter Rob M
  • Start date Start date
R

Rob M

Is it possible to display data in a combo box that's not available as
one of its drop-down options?

I have a healthcare database that tracks patient appointments and the
attending doctor. The doctors are listed in a combox box that's
supplied by a table (tblDoctors).

If a doctor quits, we need to display their previous appointments with
the patient in the combo box, but not have them available as a choice
for future appointments. I tried to accomplish this by creating a
field called "Inactive" in tblDoctors, and making this a criterion in
the combo box's row source area. That eliminates the former doctor as
a choice, but for their previous appointments, the combox box is
blank.

Can anyone suggest a way to correct this programmatically in Access?

Thank you,
Rob
 
Rob M wrote, on 26th Apr. 2012 15:49 UTC + 1 :
[sorry my server finds it too long]

Hello,

Well I think you suggested the good solution, add an inactive field (I
should have said an active field, but if you designed it so ...) in the
tblDoctors table, apply this field as a filter for further appointments,
not for past ones.

What was the problem with that ?
 
Hello, thanks for replying. The problem is that the combo box no
longer displays that doctor at all - they're not available as a choice
(good), but their name does not show up at all for previous
appointments (bad). The combo box is simply empty.

Cheers,
Rob
 
Rob M wrote, on 26th Apr. 2012 19:19 UTC + 1 :
Hello, thanks for replying. The problem is that the combo box no
longer displays that doctor at all - they're not available as a choice
(good), but their name does not show up at all for previous
appointments (bad). The combo box is simply empty.

Cheers,
Rob

Well, I fear you put the same controlsource in both cases.
 
Rob M wrote, on 26th Apr. 2012 20:49 UTC + 1 :
After hours of searching and playing around, I found a solution here:

http://www.pcreview.co.uk/forums/filtered-combo-box-and-displaying-items-not-list-t3860973.html

Thanks for your help.

Hello,

I do not realize exactly why you needed hours of searching and playing
around.

You were satisfied with the filtered data, and knew you needed the
unfiltered data from the same source in another context.

So ... what was the problem ?
Just take both.

Of course I should understand the difficulty if you had an elaborate
filter in one case, and another elaborate filter in another case with
different criteria.
 
Back
Top