Null Values In Combo Box

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
 
G

Gary Miller

Jim,

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

Gary Miller
 
J

Jim Jawn

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top