×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Microsoft: FoxPro FAQ

Program Source Code

Utility for Type, List & Select / Incremental Search by advancepack
Posted: 31 Oct 03

set talk OFF
define window customer from 0,0 to 20,80 in window screen font 'arial',10 title 'Customer Database'
move window customer center
activate window customer
@ .1,1 say 'Type some Characters to Find, Press <DOWNARRAY> & <ENTER> to select' style "B" color R+/w*
Use Customer
SrchONField="Company"
define popup CustPOP from 0,0 prompt field &SrchONField
@ 2,2 get CustVar1 default space(1) pict '@!' size 1,1.5 valid CustList() when CustList()
@ 2,$ get CustVar2 default space(1) pict '@!' size 1,1.5 valid CustList() when CustList()
@ 2,$ get CustVar3 default space(1) pict '@!' size 1,1.5 valid CustList() when CustList()
@ 2,$ get CustVar4 default space(1) pict '@!' size 1,1.5 valid CustList() when CustList()
@ 2,$ get CustVar5 default space(1) pict '@!' size 1,1.5 valid CustList() when CustList()
@ 3,2 get OptArray popup CustPOP size 11,40 default Company when WCustPOP()
READ
release window customer
wait wind iif(lastkey()=13,"Selected Company : "+OptArray,"") nowa
RETURN

FUNCTION CustList
*****************
for ii=_Curobj to 5
   store " " to ("CustVar"+allt(str(ii+1)))
endfor
set filt to upper(&SrchONField)=upper(allt(CustVar1+CustVar2+CustVar3+CustVar4+CustVar5))
do case
case last()=24
   _curobj=objn(OptArray)
case last()=13 AND !empty(CustVar1)
   clear read
case last()=1 AND _curobj#1
   _curobj=objn(CustVar1)
endcase
show gets
RETURN

FUNCTION WCustPOP
*****************
if !inlist(Lastkey(),24,5)
   _curobj=1
   keyboard chr(lastkey()) plain
endif
RETURN   

Back to Microsoft: FoxPro FAQ Index
Back to Microsoft: FoxPro Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close