Avoid nulls in Combo box

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!
 
K

KARL DEWEY

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
 
T

Tara

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!
 

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