Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

LOOKUP( pTarget, cTable, xcField_exp, nRow, nCol )

Purpose

VALIDation with display of a lookup table field.

Arguments

     pTarget -- object to look up

     cTable -- alias of lookup table

     xcField_exp -- character string containing field or expression to
                        display (will be macro-expanded)

     nRow -- row on which to display xcField_exp

     nCol -- column at which to display xcField_exp

Setup

cTable must be opened and indexed on the key on which the SEEK is to be
performed. The other parameters must be passed and must be the correct data
type.

Example

     LOCAL mAccount_No
     CHK_DICT( "AAI_DICT" )

     SELECT CUSTOMER
     SET ORDER TO GET_ORDER( "ACCOUNT_NO" )

     @ 5, 10 SAY "Name: "
     mAccount_No := SPACE( LEN( ACCOUNT_NO ) )
     @ 7, 10 SAY "Account#:" GET mAccount_No VALID ;
        LOOKUP( mAccount_No, "CUSTOMER", "LAST_NAME", 5, 16 )

     READ_IT()

Returns

.T. if pTarget is found in the lookup table, else .F.

Side Effects

If successful, the function displays &xcField_exp at nRow,
nCol, else it pops up a message indicating a failed search.

Artful Calls

MAKE_STR, SYSCOLOR, POP_MSG

Source File

AA_LOOKU.PRG

See Also: EXIST() FETCH() HELP_FILL()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson