problem is not solved by using "is not null'

S

sajid munir

Dear sir
I want to see only those fields in report, which are not
empty.
When I use "is not null" in the query below all the
fields. It show me only those records in which no field
is empty and It leave all those records in which one or
more than one record is empty.
For example
i have a form as below for selling fruits


Orages 2 kilo
mango 5 kilo
banana (empty)
apple 6 kilo
pine apple (empty)

i want to see the report of only non empty fields without
space as below.

Orages 2 kilo
mango 5 kilo
apple 6 kilo

Please help me.
 
A

Albert D. Kallal

What you should here is go to the query builder, and open up the query in
design mode.

You can then go view->SQL view.

Take the above sql, and paste it into a reply to this message. I am assuming
that this sql is the source your are using for the report.

The sql should look something like:

SELECT tblProducts.ProductName, tblProducts.Weight
FROM tblProducts
WHERE (((tblProducts.Weight) Is Not Null));

So, your sql source for the report should look like the above. It is
possible that your table structures are much more complex then the above,
and perhaps you have relations between tables (this information is important
in enabling me to help you solve this problem).

If in fact the fields are not null, it is very possbile they are of zero
length.

Lets try and get the is Null thing to work. If it is does not, then we have
to start looking at antoher possbile problem here!

So, if

Is Not Null

Does not work, then I would try:

WHERE ((Len(tblProducts.Weight) > 0 ));
 
M

MacDermott

Are Orages, mango, banana, apple and pine apple separate fields in each
record?
Or are they in separate records?

If they are all in the same record, I'd recommend setting the "CanShrink"
property of your textboxes to True, so that empty ones will disappear.

HTH
- Turtle
 

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