Steve,

See my earlier discussion in the last few days regarding testing
for null using the indicator variables that can contain the
values 0 or -1.  This might help you simplify your IF test.

When I have such a problem it helps to first break the test into
independent statements and work with them so that each part
produces a valid answer then I begin to combine the one part at
a time until I have a combined statement that works.

Jim
--- Steve Breen <[EMAIL PROTECTED]> wrote:

> Bill,
>  
> Still can't get past the point that I can enter both a
> vstart_inv and vend_inv number and the statement will succed
> and go to finish. This has been my problem. The user must
> enter a vmacola number and a vstart_inv and vend_inv number or
> a vmacola number and a vstart_inv and vend_inv number. The
> vstart_inv number and vend_inv number variables can not have
> data in them with out a vmacola or vcdicustn having data in
> them (one or the other not both).
>  
> Should I just do two different verification statements or can
> this be done in one step as I have been trying to do?
>  
> Thanks
>  
> Steve
> 
> ________________________________
> 
> From: [email protected] on behalf of Bill Downall
> Sent: Mon 4/14/2008 3:14 PM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - Re: Code Line Probelm
> 
> 
> Steve,
> 
> Because you have a mix of "OR"s and "AND"s that are now within
> parentheses, R:BASE is grouping and parsing differently than
> you expect. You need to be complete and clear with your
> parentheses.
> 
> Here's my attempt to translate your English description
> directly to an IF statement:
> 
> IF ((vstart_inv IS NOT NULL AND vend_inv IS NOT NULL AND
> vmacloa IS NOT NULL) +
> OR (vstart_inv IS NOT NULL AND vend_inv IS NOT NULL AND
> vcdicustn IS NOT NULL)) +
> AND ((vmacola IS NULL and vcdicustn IS NOT NULL) OR +
>   (vmacola IS NOT NULL AND vcdicustn IS NULL)) THEN
> 
> Bill
> 
> 
> On Mon, Apr 14, 2008 at 3:01 PM, Steve Breen
> <[EMAIL PROTECTED]> wrote:
> 
> 
>        
>       Note: In other words either vstart_inv, vend_inv and vmacloa
> must all have data or vstart_inv, vend_inv and vcdicustn must
> all have data. Finally vmacola and vcdicustn both can not have
> data at the same time but I have taken care of this
> verification previously in the code. This is the final
> verification in the code line..
>        
>       Thanks for any help.
>        
>       Steve
>        
>        
>       -- Start of Verification 4 You must enter a starting and
> ending invoice number
>       CLEAR VAR vyesno
>       CLEAR VAR vendkey
> 
>       
>       IF (vstart_inv is null or vend_inv is null) and vmacola is
> not null and vcdicustn is null +
>       or +
>       (vstart_inv is null or vend_inv is null) and vmacola is null
> and vcdicustn is not null +
>       then
> 
>       -- (CHAR(009)) = Tab Key (Indent)
>       -- (CHAR(013)) = Carriage Return
>       CLS
> 
>       SET VAR vmsg = +
>       ('Please Note: You Must Enter a Macola or Customer Number
> Only'+(CHAR(013))+ +
>       ' and A Begining and Ending Invoice Date and You Have Not'+
> (CHAR(013))+ +
>       ' '+ (CHAR(013))+ +
>       'If You Want To Re-Enter Your Data Select "Yes" or Select
> "No" To Quit'+ (CHAR(013))+ +
>       ' '+ (CHAR(013)))
>       DIALOG .vmsg vyesno vendkey no +
>       OPTION MESSAGE_FONT_NAME ARIAL FB|MESSAGE_FONT_SIZE
> 12|MESSAGE_BOLD ON +
>       CAPTION ' Your Dialog Caption Here ...' +
>       ICON APPEND +
>       OPTION TITLE_FONT_COLOR BLACK +
>       |TITLE_BACK_COLOR WHITE +
>       |TRANSPARENCY 255 +
>       |WINDOW_BACK_COLOR WHITE +
>       |BUTTON_YES_CAPTION &YES +
>       |BUTTON_NO_CAPTION &NO +
>       |BUTTON_YES_COLOR GREEN +
>       |BUTTON_NO_COLOR RED +
>       |BUTTON_YES_FONT_COLOR WHITE +
>       |BUTTON_NO_FONT_COLOR WHITE +
>       |TOP 200 +
>       |LEFT 200
>       
> 
>       IF vyesno = yes THEN
>       GOTO re_enter
>       ENDIF
>       
> 
>       IF vyesno = no THEN
>       GOTO finish
> 
>       ENDIF
>       ENDIF
> 
>       -- End Verificaton 4
> 
> 
> 


Jim Bentley
American Celiac Society
[EMAIL PROTECTED]
tel: 1-504-737-3293


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


Reply via email to