OK amigo, no problemgdp wrote: Sorry, Esgici, was the emotion .....
...
And Now, this was the solution that i found . . . .
Happy HMG
Moderator: Rathinagiri
OK amigo, no problemgdp wrote: Sorry, Esgici, was the emotion .....
...
And Now, this was the solution that i found . . . .
Code: Select all
#include "hmg.ch"
PROC Main()
private MN
MN := {}
OP()
GO TOP // create array no index
do while ! eof()
aADD(mn, INV->NUM1 )
SKIP
LOOP
ENDDO
GO TOP
DEFINE WINDOW form_1 ;
AT 0,0 ;
WIDTH 650 ;
HEIGHT 400;
TITLE 'CSBox ( Combined Search Box ) Test' ;
MAIN
@ 35, 010 textbox text_1 ;
width 100 ;
field inv->num1 ;
READONLY
@ 35, 132 textbox text_2 ;
width 100
tooltip 'Press Escape to Exit'
define combobox s1
row 35
col 111
width 20
TABSTOP .F.
backcolor {0,0,255}
ITEMS MN
DROPPEDWIDTH 300
DISPLAYEDIT .T.
ONDISPLAYCHANGE nt()
ONCLOSEUP NT1()
ON GOTFOCUS GF()
ONLOSTFOCUS FORM_1.text_2.visible := .F.
tooltip 'Press Escape to Exit'
end combobox
END WINDOW // frmCSBTest
form_1.text_2.visible := .f.
form_1.Center
form_1.activate
FUNCTION GF
FORM_1.TEXT_2.VALUE := ''
FORM_1.TEXT_2.VISIBLE := .T.
RETURN
FUNCTION NT
SELECT inv
FORM_1.TEXT_2.VALUE := FORM_1.S1.DISPLAYVALUE
RETURN
FUNCTION NT1
LOCAL LAS := inv->NUM1
IF ASC(HMG_GETLASTCHARACTER()) = 27
SEEK LAS
form_1.text_2.value := ''
FORM_1.TEXT_1.REFRESH
FORM_1.TEXT_1.SETFOCUS
RETURN
ENDIF
IF form_1.s1.value = 0
SEEK FORM_1.S1.DISPLAYVALUE
form_1.text_2.value := FORM_1.S1.DISPLAYVALUE
IF EOF()
SEEK LAS
MSGBOX(FORM_1.S1.DISPLAYVALUE+ ' Not Found')
ENDIF
ELSE
SEEK mn[FORM_1.S1.VALUE]
ENDIF
form_1.text_2.value := ''
FORM_1.TEXT_1.REFRESH
FORM_1.TEXT_1.SETFOCUS
FORM_1.S1.VALUE := 1
RETURN
FUNCTION op
LOCAL CF :={}
if ! file('inv.dbf')
CF := {}
aADD(CF,{'NUM1' ,'C' , 15,0})
aADD(CF,{'DESC' ,'C' , 15,0})
DBCREATE( 'inv.dbf',CF )
USE
use inv new
index on num1 to num1
set index to num1
do while recno() < 40000
append blank
replace num1 with alltrim(str(10000+recno()))
replace desc with 'D' +alltrim(str(10000+recno()))
loop
enddo
close inv
endif
use inv shared new
set index to num1
return
In contrary to minimized identifiers,franco wrote:...This is complete program that creates the table and runs.
hope this will help or give you some ideas ...
Alayna ve alaykoum Salam yâ Âhitonton2 wrote: Salamalaykoum Mr Esgici