John W. Vinson <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in
news:(E-Mail Removed):
> On 22 Jun 2010 01:14:38 GMT, "David W. Fenton"
> <(E-Mail Removed)> wrote:
>
>>I disagree.
>>
>>The way I handle this is by using criteria in rowsource of the
>>combo box that is (IS ACTIVE or ID=CurrentFormID). That means you
>>have to requery the combo box in the OnCurrent of the form, and
>>that you have to check the ACTIVE value in the BeforeUpdate event
>>and prevent the user from choosing it. I prefer this to mucking
>>about with multiple controls.
>
> Thanks, David - that sounds like another good option, I'll try it
> out. It may well work better for some of my forms.
>
> Wouldn't this have the disadvantage that the user would still
> *see* inactive records, and perhaps get frustrated at being unable
> to select them? I wonder if it would be possible instead to change
> the rowsource in the combo's gotfocus event, so it shows all
> records when it does not have the focus, but only active ones when
> it does?
I'm not sure what issue you're talking about. It would show only
ACTIVE records EXCEPT for the value in the current record. Why would
you then choose the same value again? If you're editing the value,
it's surely because you want to change it, so you wouldn't choose
the one that's already there. And if you do, the BeforeUpdate will
kick in and tell you that you can't do that because it's INACTIVE.
I do generally include the ACTIVE column in the rowsource (using a
padded X as a replacement for a checkbox).
--
David W. Fenton
http://www.dfenton.com/
usenet at dfenton dot com
http://www.dfenton.com/DFA/