General discussion

Locked

Access: condit macro if query null

By Redolph ·
I've got a query that sends multiple error "reports", which are really queries listing exceptions.

I am trying to use the condition portion of the macro to skip the "sendobject" of sending the contents of a query by email, if the query yields no records.

Does anyone know the proper syntax for this?

I was thinking of something like "[Query]![Query1] is null", but it doesn't like that.

Thanks!

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by sgt_shultz In reply to Access: condit macro if q ...

i snipped this from Visual Basic Help in Access 2000
see if you have VB help installed by going to Modules, New. then pick Help in the VB Editor. very nice Help with some examples...
<snip>
IsNull Function


Returns a Boolean value that indicates whether an expression contains no valid data (Null).

Syntax

IsNull(expression)

The required expression argument is a Variant containing a numeric expression or string expression.

Remarks

IsNull returns True if expression is Null; otherwise, IsNull returns False. If expression consists of more than one variable, Null in any constituent variable causes True to be returned for the entire expression.

The Null value indicates that the Variant contains no valid data. Null is not the same as Empty, which indicates that a variable has not yet been initialized. It is also not the same as a zero-length string (""), which is sometimes referred to as a null string.

Important Use the IsNull function to determine whether an expression contains a Null value. Expressions that you might expect to evaluate to True under some circumstances, such as If Var = Null and If Var <> Null, are always False. This is because any expression containing a Null is itself Null and, therefore, False.

Back to Software Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums