OK. Check for a NULL before you get into that part of the statement. You are checking for the NULL after the statement is evaluated, rather than before. Try reordering your code like this:

LABEL startfill

FILLIN vstreetnm USING 'ENTER PART OF THE STREET NAME OF THE JOB '

IF vstreetnm IS NULL THEN

  GOTO startfill

ENDIF




SET VAR vjob2 TEXT = null

CHOOSE vjob2 FROM #VALUES FOR (LJS(jobnam,30)&jbdsc+ ' @ ' &cntr), jidcode FROM jobs WHERE +

jobnam CONTAINS .vstreetnm ORDER BY jidcode CAPTION ' CHOOSE ADDRESS' LINES 40 FORMATTED OPTION |THEMENAME R:BASE ROCKS!



On 1/18/2014 10:38 AM, mike epstein sony viao office wrote:

With the trace on or off the message still appears because the 'fill in ' statement was null

The 1^st error message says nulls cannot be used in comparisons other than 'ne' or 'eq'

That is the hurdle ,  the user did not ' fill in'  the null

CHOOSE vjob2 FROM #VALUES FOR (LJS(jobnam,30)&jbdsc+ ' @ ' &cntr), jidcode FROM jobs WHERE +

jobnam CONTAINS .vstreetnm ORDER BY jidcode CAPTION ' CHOOSE ADDRESS' LINES 40 FORMATTED OPTION |THEMENAME R:BASE ROCKS!

*From:*[email protected] [mailto:[email protected]] *On Behalf Of *Albert Berry
*Sent:* Saturday, January 18, 2014 11:15 AM
*To:* RBASE-L Mailing List
*Subject:* [RBASE-L] - Re: needing some help

You have TRACE on, which is designed specifically to give you the error messages. Remark out the line SET TRACE ON.
Albert

On 1/18/2014 10:04 AM, mike epstein sony viao office wrote:

    It has been a while since I have posted , I'm a bit rusty on my
    programming. Here is my problem ;

    In A form I have used for 6 or 7 years that I use to locate street
    numbers and street names ,

    Actually I used a drop down menu  for 4 catagories to search  (one
    of which is the street number and street name )

    In the code listed below (label startfill) if nothing is entered
    or found in the fillin statement ,  a number error messages appear
    that are cleared by pressing the return key Quite annoying .

    I know that this is a simple task but I can't seem to figure this out.

    I deffer to the wisdom of the list

    Mike Epstein

    CLEAR VAR vjob2,vjob3

    CLEAR VAR vstreetnm

    SET TRACE ON

    SET VAR cflock TEXT = (CVAL('FASTLOCKS'))

    SET VAR cqual TEXT = (CVAL('QUALCOLS'))

    SET VAR dbsa TEXT = (CVAL('DATABASE'))

    SET VAR vstreetnm TEXT

    SET QUOTES = '

    LABEL startfill

    FILLIN vstreetnm USING 'ENTER PART OF THE STREET NAME OF THE JOB '

    SET VAR vjob2 TEXT = null

    CHOOSE vjob2 FROM #VALUES FOR (LJS(jobnam,30)&jbdsc+ '    @  '
    &cntr), jidcode FROM jobs WHERE +

    jobnam CONTAINS .vstreetnm ORDER BY jidcode CAPTION ' CHOOSE
    ADDRESS' LINES 40 FORMATTED OPTION |THEMENAME R:BASE ROCKS!

    IF vstreetnm IS NULL THEN

      GOTO startfill

    ENDIF

    SET VAR vjob2 INTEGER

    SET VAR vjob3 INTEGER

    SET VAR vemad TEXT

    SET VAR vjob3 INTEGER = .vjob2

    SET VAR vjobg INTEGER = .vjob3

    SET VAR vcntrp TEXT

    SET VAR vphon TEXT

    SELECT cntr INTO vcntrp INDICATOR indvcntrp FROM jobs WHERE
    jidcode = .vjob2

    SELECT emailadd INTO vemad INDICATOR indvemad FROM customer WHERE
    cntr = .vcntrp

    SELECT phone INTO vphon INDICATOR indvphon FROM customer WHERE
    cntr = .vcntrp

    SELECT jobnam INTO vjnm INDICATOR indvjnm FROM jobs WHERE jidcode
    = .vjobg

    SELECT cozip INTO vcozip INDICATOR indvcozip FROM jobs WHERE
    jidcode = .vjobg

    SET VAR vgoog TEXT = (.vjnm &'TN'&',' & CTXT(vcozip))

    RECALC VARIABLES

    PROPERTY cid_vlvpkjb refreshlist 'true'

    --(PROPERTY ComponentID MAKECLICK '1')

    PROPERTY cid_psjr refreshlist 'true'

    PROPERTY cid_pjdd refreshlist 'true'


Reply via email to