Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • 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!

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

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...This site is like first coffee in the winter morning..."

Geography

Where in the world do Tek-Tips members come from?

Microsoft: FoxPro (old versions 1 to 2.6) FAQ

Program Source Code

Utility for Type, List & Select / Incremental Search
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 (old versions 1 to 2.6) FAQ Index
Back to Microsoft: FoxPro (old versions 1 to 2.6) 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