Should I use "Is Null" or something else? (Duh!)

J

Jim In Minneapolis

Hi. I'm pretty new at this -- can someone help me out?

Here's my VBA module argument:

If ((.[Planet Number].Column(1) = "Moon" Or .[Planet Number].Column(1) =
"Saturn") And .[Aspect Number].Column(1) = "Conjunct" And (.[Aspected Planet
Number].Column(1) = "Moon" Or .[Aspected Planet Number].Column(1) =
"Saturn")) Then

It works great, but I need to add a condition that says: "If the text field
[Midpoint Statement] in this same record is *NOT EMPTY* (in other words, if
the [Midpoint Statement] field has ANYTHING in it, then IGNORE this entire
argument (just skip the entire argument -- pretend it isn't even there! --
and go on to the next argument in the module).

I've been playing around with "Is Null" but I keep getting error messages --
I'm afraid I don't know the syntax.

If anyone knows how to fix this, I'll sure be grateful. (Please make sure
to show me the 'final product' -- send me the COMPLETE 'fixed' argument line,
ok? Don't just tell me to 'insert' something -- 'cause I'll surely screw it
up!)

Thanks for your patience.

Jim
(a)
 
A

Alex Dybenko

hi,
you can either use
IsNull(.[Midpoint Statement])
or
Len(.[Midpoint Statement] & "")=0
 
J

Jim In Minneapolis

Hi Alex

Thanks for the help. Your suggestions sound great. But I have no idea
how to "insert" them into my existing argument string. When I tried just
now, I got 'error' messages asking for additional parenthesis, etc.

Would you please reply and show me the ENTIRE correct new string (i.e. my
original statement now 'fixed' by the addition of your new argument)? I'm
sure you know where all the parenthesis should go (I don't!)

- Jim

****************************

Alex Dybenko said:
hi,
you can either use
IsNull(.[Midpoint Statement])
or
Len(.[Midpoint Statement] & "")=0


--
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


Jim In Minneapolis said:
Hi. I'm pretty new at this -- can someone help me out?

Here's my VBA module argument:

If ((.[Planet Number].Column(1) = "Moon" Or .[Planet Number].Column(1) =
"Saturn") And .[Aspect Number].Column(1) = "Conjunct" And (.[Aspected
Planet
Number].Column(1) = "Moon" Or .[Aspected Planet Number].Column(1) =
"Saturn")) Then

It works great, but I need to add a condition that says: "If the text
field
[Midpoint Statement] in this same record is *NOT EMPTY* (in other words,
if
the [Midpoint Statement] field has ANYTHING in it, then IGNORE this entire
argument (just skip the entire argument -- pretend it isn't even there! --
and go on to the next argument in the module).

I've been playing around with "Is Null" but I keep getting error
messages --
I'm afraid I don't know the syntax.

If anyone knows how to fix this, I'll sure be grateful. (Please make sure
to show me the 'final product' -- send me the COMPLETE 'fixed' argument
line,
ok? Don't just tell me to 'insert' something -- 'cause I'll surely screw
it
up!)

Thanks for your patience.

Jim
(a)
 
J

Jim In Minneapolis

Thank you, Alex

You've been very helpful to me . . . I appreciate your taking the time for me.

Jim

Alex Dybenko said:
hi,
you can either use
IsNull(.[Midpoint Statement])
or
Len(.[Midpoint Statement] & "")=0


--
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


Jim In Minneapolis said:
Hi. I'm pretty new at this -- can someone help me out?

Here's my VBA module argument:

If ((.[Planet Number].Column(1) = "Moon" Or .[Planet Number].Column(1) =
"Saturn") And .[Aspect Number].Column(1) = "Conjunct" And (.[Aspected
Planet
Number].Column(1) = "Moon" Or .[Aspected Planet Number].Column(1) =
"Saturn")) Then

It works great, but I need to add a condition that says: "If the text
field
[Midpoint Statement] in this same record is *NOT EMPTY* (in other words,
if
the [Midpoint Statement] field has ANYTHING in it, then IGNORE this entire
argument (just skip the entire argument -- pretend it isn't even there! --
and go on to the next argument in the module).

I've been playing around with "Is Null" but I keep getting error
messages --
I'm afraid I don't know the syntax.

If anyone knows how to fix this, I'll sure be grateful. (Please make sure
to show me the 'final product' -- send me the COMPLETE 'fixed' argument
line,
ok? Don't just tell me to 'insert' something -- 'cause I'll surely screw
it
up!)

Thanks for your patience.

Jim
(a)
 
A

Alex Dybenko

hi,
try:

If ((.[Planet Number].Column(1) = "Moon" Or .[Planet Number].Column(1) =
"Saturn") And .[Aspect Number].Column(1) = "Conjunct" And (.[Aspected Planet
Number].Column(1) = "Moon" Or .[Aspected Planet Number].Column(1) =
"Saturn")) OR (Len(.[Midpoint Statement] & "")>0)Then

not sure what you mean with "IGNORE this entire argument", perhaps you can
replace OR with AND

--
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


Jim In Minneapolis said:
Hi Alex

Thanks for the help. Your suggestions sound great. But I have no idea
how to "insert" them into my existing argument string. When I tried just
now, I got 'error' messages asking for additional parenthesis, etc.

Would you please reply and show me the ENTIRE correct new string (i.e. my
original statement now 'fixed' by the addition of your new argument)? I'm
sure you know where all the parenthesis should go (I don't!)

- Jim

****************************

Alex Dybenko said:
hi,
you can either use
IsNull(.[Midpoint Statement])
or
Len(.[Midpoint Statement] & "")=0


--
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


in
message news:[email protected]...
Hi. I'm pretty new at this -- can someone help me out?

Here's my VBA module argument:

If ((.[Planet Number].Column(1) = "Moon" Or .[Planet
Number].Column(1) =
"Saturn") And .[Aspect Number].Column(1) = "Conjunct" And (.[Aspected
Planet
Number].Column(1) = "Moon" Or .[Aspected Planet Number].Column(1) =
"Saturn")) Then

It works great, but I need to add a condition that says: "If the text
field
[Midpoint Statement] in this same record is *NOT EMPTY* (in other
words,
if
the [Midpoint Statement] field has ANYTHING in it, then IGNORE this
entire
argument (just skip the entire argument -- pretend it isn't even
there! --
and go on to the next argument in the module).

I've been playing around with "Is Null" but I keep getting error
messages --
I'm afraid I don't know the syntax.

If anyone knows how to fix this, I'll sure be grateful. (Please make
sure
to show me the 'final product' -- send me the COMPLETE 'fixed' argument
line,
ok? Don't just tell me to 'insert' something -- 'cause I'll surely
screw
it
up!)

Thanks for your patience.

Jim
(a)
 
Top