Link to home
Create AccountLog in
Avatar of Mark Drelinger
Mark DrelingerFlag for United States of America

asked on

Micrsoft Access Macro if Statement Syntax

In an Access 2010 Macro, I want to include an If Block to send email only if the record set is not null.
I am getting an error "The expression you entered has a function name that Microsoft Access can't find".
Screen shot attached.
C--Users-Drelinger.D179434-Desktop-C.JPG
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Mark Drelinger

ASKER

Microsoft Access cannot parse the expression:
'IF dcount("*","qryExceptionListNewSales") >0
Might be just where I'm placing it in the Macro.
Screen shot attached seems to work, so Thank you, Rey.
Still tinkering.
Mark
C--Users-Drelinger.D179434-Desktop-C.JPG
much appreciated. I Always learn from you, Rey. Thanks.
; gave same error (can not parse).
This works:
DCount("*","qryExceptionListNewSales")<>0
Thanks again.