wanderaround
Programmer
I have a form with a Command Button which going to collect data from varous tables and append to a temp table. The problem is the Set filter To command not work in the form of Command Button. I have another form with the same command but it work fine. Anyone can tell me what setting will affect the issue of Set Filter To Command? Following is part of the program inside the Command Button.
.......
.......
SELECT dep_wd && Add Deposit and Withdraw to Temp Table.
SET FILTER TO ((MONTH(dw_date)=MONTH(ws_date) .and. YEAR(dw_date)=YEAR(ws_date)) .and. TRIM(dw_client)=TRIM(ws_client))
GO TOP
DO WHILE .not. EOF()
STORE VAL(dw_code) TO ws_cn
STORE dw_type TO ws_type
STORE dw_client TO ws_client
STORE dw_stock TO ws_stock
STORE dw_qty TO ws_qty
SELECT temp_cn
APPEND BLANK
replace tr_cn WITH ws_cn
replace tr_type WITH ws_type
replace tr_client WITH ws_client
replace tr_stock WITH ws_stock
replace tr_qty WITH ws_qty
replace tr_date with ws_date
SELECT dep_wd
SKIP
ENDDO
SET FILTER TO
.......
.......
These commands are inside the loop and the loop will be repeat when the ws_client is changed until EOF.(*content of ws_client will be update from another table*)
Some more information: There are another table with Set filter to command and doesn't work in the same form. But I had copy those command to another program and use procedure call then it work fine. Why?
VFP 7 with sp1.
Thanks for any effort.
Wanderaround
.......
.......
SELECT dep_wd && Add Deposit and Withdraw to Temp Table.
SET FILTER TO ((MONTH(dw_date)=MONTH(ws_date) .and. YEAR(dw_date)=YEAR(ws_date)) .and. TRIM(dw_client)=TRIM(ws_client))
GO TOP
DO WHILE .not. EOF()
STORE VAL(dw_code) TO ws_cn
STORE dw_type TO ws_type
STORE dw_client TO ws_client
STORE dw_stock TO ws_stock
STORE dw_qty TO ws_qty
SELECT temp_cn
APPEND BLANK
replace tr_cn WITH ws_cn
replace tr_type WITH ws_type
replace tr_client WITH ws_client
replace tr_stock WITH ws_stock
replace tr_qty WITH ws_qty
replace tr_date with ws_date
SELECT dep_wd
SKIP
ENDDO
SET FILTER TO
.......
.......
These commands are inside the loop and the loop will be repeat when the ws_client is changed until EOF.(*content of ws_client will be update from another table*)
Some more information: There are another table with Set filter to command and doesn't work in the same form. But I had copy those command to another program and use procedure call then it work fine. Why?
VFP 7 with sp1.
Thanks for any effort.
Wanderaround