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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why does this coding in error? 1

Status
Not open for further replies.

nvtjellis

Programmer
Mar 6, 2001
24
US
WhilePrintingRecords;
Global NumberVar Nxt_IDCODE02;
Global NumberVar Old_IDCODE01;
ToNumber next({IDCodes.IDCode});
({@Nxt_IDCODE02} = Next ({IDCodes.IDCode}));
ToNumber ({IDCodes.IDCode});
({@Old_IDCODE01} = ({IDCodes.IDCode}));
({@Nxt_IDCODE02}) - ({@Old_IDCODE01});

I need to subtract the next records IDCODE from the current IDCODE. Both are string fields in the DB.....
 
Try:

tonumber({IDCodes.IDCode}) - tonumber(next({IDCodes.IDCode}))

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top