how do i query if(isblank)

V

vanderghast

Blank as in an empty string, or as a NULL, or as a string filled only with
spaces?

Since you want to use it in a multiplication, I assume you meant NULL:

iif( f5 is null, null, f5 * j5 )

( or simply, Nz( f5 * j5, "" ) )

where I also assume j5 is a decimal value, such as 0.05 when the meaning
can be read as 5% once formatted.

Note that if f5 is null, the formula return a null, not a zero length
string. If you need it, inside another computation, you may prefer to use a
zero:


iif( f5 is null, 0, f5 * j5 )


or simply just:

Nz( f5 * j5, 0)



since, if f5 is null, f5 * j5 will produce a null, all by itself, and Nz
will replace it with a zero, or with an empty string as in the first
supplied alternative.



Vanderghast, Access MVP
 

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