Item Not In List Message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Within my subform, I've got a combo box (cboProgram) that looks up its values
based on the selection in the combo box (cboGroupRole). I've got limit to
list set to Yes. If I actually go into cboProgram and type anything other
than what's in the list, I get the appropriate "not in list" message. The
problem is if I change the value in cboGroupRole, and I try to leave the
existing value in cboProgram (and it's NOT in the list), I don't get the "not
in list" error. I only get a "not in list" error if I actually go into the
cboProgram control and pull down the list - not if I simply tab past it or
change the current record.

Help!
 
Hi Kirk

In the AfterUpdate event of cboGroupRole, after you requery cboProgram, set
its value to Null:

cboProgram.Requery
cboProgram = Null
 
Good idea - set the list to Null and make the user select the appropriate
value. Works perfectly and thanks for the suggestion.

Graham Mandeno said:
Hi Kirk

In the AfterUpdate event of cboGroupRole, after you requery cboProgram, set
its value to Null:

cboProgram.Requery
cboProgram = Null

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Kirk P. said:
Within my subform, I've got a combo box (cboProgram) that looks up its
values
based on the selection in the combo box (cboGroupRole). I've got limit to
list set to Yes. If I actually go into cboProgram and type anything other
than what's in the list, I get the appropriate "not in list" message. The
problem is if I change the value in cboGroupRole, and I try to leave the
existing value in cboProgram (and it's NOT in the list), I don't get the
"not
in list" error. I only get a "not in list" error if I actually go into
the
cboProgram control and pull down the list - not if I simply tab past it or
change the current record.

Help!
 
Back
Top