Is it possible seek Numeric field with xBrowse ?
Regards MAurizio
oBrw:bSeek := { |cSeek| CUST->( DbSeek( Val( cSeek ), .t. ), !eof() ) }
#include 'fivewin.ch'
#include 'xbrowse.ch'
REQUEST DBFCDX
function Main()
local oDlg, oBrw
local oSeek, cSeek := Space(25)
USE CUSTOMER NEW ALIAS CUST SHARED VIA 'DBFCDX'
SET ORDER TO TAG SALARY
GO TOP
DEFINE DIALOG oDlg SIZE 540,480 PIXEL
@ 10, 10 XBROWSE oBrw ;
COLUMNS 'First','Last','Salary' ;
SIZE 250,200 PIXEL ;
OF oDlg ;
ALIAS 'CUST' ;
AUTOSORT
@ 220, 10 SAY oSeek VAR cSeek SIZE 100,10 PIXEL OF oDlg ;
COLOR CLR_BLACK, CLR_YELLOW
oBrw:bSeek := { |cSeek| CUST->( DbSeek( Val( cSeek ), .t. ), !eof() ) }
oBrw:oSeek := oSeek
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
return nil
Maurizio wrote:Thank NageswaraRao
I try your sample , it works but only on the numeric Col. If you have two Col ( one numeric and one character ) and you need both seek
doesn't works .
Maurizio
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 63 guests