Avoid nulls in Combo box

  • Thread starter Thread starter Tara
  • Start date Start date
T

Tara

I have a form that displays Customer information with subform that displays
receipts for each of those customers. I have 2 combos on the form, one of
which displays Business name, the other which displays Contact name. This
way, users can look up records based on either of those names. The problem
is that some businesses do not have a specific contact person, so there are
lots of blank records at the beginning of the dropdown. Is there a way to
stop those blanks from "displaying"?

I used the combo wizard to create these combos and chose the "Find a record
on my form based on the value I select in my combo box" option. I realize I
could base the combo on a query, keep nulls out that way, and just use the
After Update event to requery my subform, but I'm curious to see if there's
another way.

Thanks!
 
The combo source will be a SQL statement. Open form in design view, right
click, select properties. Click on the combo and look at the source SQL
statement.
Add WHERE [xxx] Is Not Null
 
Perfect! Thank you.

KARL DEWEY said:
The combo source will be a SQL statement. Open form in design view, right
click, select properties. Click on the combo and look at the source SQL
statement.
Add WHERE [xxx] Is Not Null

--
KARL DEWEY
Build a little - Test a little


Tara said:
I have a form that displays Customer information with subform that displays
receipts for each of those customers. I have 2 combos on the form, one of
which displays Business name, the other which displays Contact name. This
way, users can look up records based on either of those names. The problem
is that some businesses do not have a specific contact person, so there are
lots of blank records at the beginning of the dropdown. Is there a way to
stop those blanks from "displaying"?

I used the combo wizard to create these combos and chose the "Find a record
on my form based on the value I select in my combo box" option. I realize I
could base the combo on a query, keep nulls out that way, and just use the
After Update event to requery my subform, but I'm curious to see if there's
another way.

Thanks!
 
Back
Top