Null Values In Combo Box

  • Thread starter Thread starter Jim Jawn
  • Start date Start date
J

Jim Jawn

I have a bound combobox that uses the ID fields from a query as the bound
column. I also have the default value of the combobox set to 0. The
problem that I'm having is that when one of the staff selects an employee
from the combobox, then tries to make the combobox "blank", it gets assigned
a null value. The null value gets stored in my tables and all of my
hard-coded search queries, searching of the 0 value, don't return those
records.

Is there anyway that I can force the default value of 0 when a null value is
set in the combobox? I can't seem to figure it out and any help would be
appreciated.

If I didn't explain this well enough, please let me know and I'll elucidate.

Thanks,

Jim Jawn
 
Jim,

You could check the value on the AfterUpdate of the form and
if it is null set it to 0.

Gary Miller
 
Thanks Gary,

My head was in a funk. The AfterUpdate Function was getting tied up in some
events, so I used the LostFocus Event of the combobox to set the values.
Thanks for the inspiration

Jim Jawn
 
Back
Top