Hello:
I have two DTPicker controls on a form.
I select the dates where I have data and I only get three or four data.
I obtain this data from a native table of a field called fec_vta type Date()
My query the following:
STORE Thisform.Ole_vtas_i.oBJECT.Value TO fec1 && DTPicker 1 Initial date
STORE Thisform.Ole_vtas_f.obJECT.Value TO fec2 && DTPicker 2 Final date
fec1 = TTOD(fec1)
fec2 = TTOD(fec2)
SELECT a_vtas.n_vta,fec_vta,Art,cant,precu,vend,tot_vta,v_tarj FROM a_vtas ;
WHERE fec_vta Between fec1 AND fec2 INTO CURSOR lcCursor_v READWRITE
SELECT lcCursor_v
IF _tally <> 0
Thisform.list1.RowSource = 'lcCursor_v'
Thisform.list1.RowSourceType = 2
ELSE
MESSAGEBOX("Does not exist data to show with selected dates.",0+64+4096,"Warning!!!")
Thisform.Ole_vtas_i.oBJECT.Value = DATE()-180
Thisform.Ole_vtas_f.obJECT.Value = DATE()
ENDIF
What could I have wrong?
I have two DTPicker controls on a form.
I select the dates where I have data and I only get three or four data.
I obtain this data from a native table of a field called fec_vta type Date()
My query the following:
STORE Thisform.Ole_vtas_i.oBJECT.Value TO fec1 && DTPicker 1 Initial date
STORE Thisform.Ole_vtas_f.obJECT.Value TO fec2 && DTPicker 2 Final date
fec1 = TTOD(fec1)
fec2 = TTOD(fec2)
SELECT a_vtas.n_vta,fec_vta,Art,cant,precu,vend,tot_vta,v_tarj FROM a_vtas ;
WHERE fec_vta Between fec1 AND fec2 INTO CURSOR lcCursor_v READWRITE
SELECT lcCursor_v
IF _tally <> 0
Thisform.list1.RowSource = 'lcCursor_v'
Thisform.list1.RowSourceType = 2
ELSE
MESSAGEBOX("Does not exist data to show with selected dates.",0+64+4096,"Warning!!!")
Thisform.Ole_vtas_i.oBJECT.Value = DATE()-180
Thisform.Ole_vtas_f.obJECT.Value = DATE()
ENDIF
What could I have wrong?