I must valid a DTPICKER control and see if the date past is on archive
the archive have one index and it is on dtos(giorno) ( the field of archive is Giorno d 8 )
I made this function but it return me allways it not found the date
I use this function when I must search a character field and it run but now with a date field I have problem beacause it not run How I wish
Any help please ?
the archive have one index and it is on dtos(giorno) ( the field of archive is Giorno d 8 )
I made this function but it return me allways it not found the date
function Controlla_Giorno( dGiorno, oGet, nMode )
// nMode 1 nuevo registro
// 2 modificación de registro
// 3 duplicación de registro
// 4 clave ajena
local lreturn := .f.
local nRecno := CA->( RecNo() )
local nOrder := CA->( OrdNumber() )
local nArea := Select()
if Empty( dGiorno )
if nMode == 4
return .t.
else
MsgStop("E' obbligatorio questo campo.")
return .f.
endif
endif
SELECT CA
CA->( DbSetOrder( 1 ) )
CA->( DbGoTop() )
if CA->( DbSeek( dGiorno ) )
nmsgBox("Found!")
DO CASE
Case nMode == 1 .OR. nMode == 3
lreturn := .f.
MsgStop("Data esistente.")
Case nMode == 2
if CA->( Recno() ) == nRecno
lreturn := .t.
else
lreturn := .f.
MsgStop("Data esistente.")
endif
Case nMode == 4
lreturn := .t.
END CASE
else
nmsgBox(" not found!")
if nMode < 4
lreturn := .t.
else
if MsgYesNo("Data inesistente. ¿ Desideri inserirlo ora? ")
* lreturn := CLEdita( , 1, , , @dGiorno )
else
lreturn := .f.
endif
endif
endif
if lreturn == .f.
* oGet:cText( space(50) )
endif
CA->( DbSetOrder( nOrder ) )
CA->( DbGoTo( nRecno ) )
Select (nArea)
return lreturnI use this function when I must search a character field and it run but now with a date field I have problem beacause it not run How I wish
Any help please ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com