Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wierd stuff hapenning

Status
Not open for further replies.

rfedyk

Programmer
Feb 15, 2002
29
AU
I have inherited a FoxPro program that has been working fine. However, it has now developed a strange behaviour. It does not update some crucial fields in a temporary table.

This is the code fragment

select mth && table alias
go top
sum val(bnf) to tbnf && sum the BENEFIT AMOUNT fields and save in the variable TBNF
replace all total_bnf with FmtNum(tbnf,15), numof_pols with reccount()


Neither field is being updated. ??????

Roger
 
Doesn't the SUM() function put the record pointer on EOF() ?
I can remember we had certain problems with COUNT TO which put the record pointer on EOF().

Just put in your code an EOF check after the SUM() function.
IF true go back to the record you were on in the first place.

HTH,

Weedz (Edward W.F. Veld)
My private project:Download the CrownBase source code !!
 
Thanks for that. Problem solved.

I had a look at your web site. Very interesting. Do a lot of people collect bottle caps, or am I missing something

Roger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top