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

Convert String Field results to a number?

Status
Not open for further replies.

pokerace

Technical User
May 24, 2005
118
US
I am pulling results from a string field but they are all numbers and I want to sum them. Since I can't sum the results from a string field, is there a way to convert these results to a number field first?
 
Hi there,

You can try the following formula

If Not isNull({StringField}) Then
If isNumeric({StringField}) Then ToNumber({StringField})
Else 0


Let me know if you get a problem

HTH

-Steve


"if at first you don't succeed, sky diving is not for you"!!! :eek:)
 
You can also try this as well but this one will only work if the field only contains numbers.

ToNumber({StringField})

HTH

-Steve


"if at first you don't succeed, sky diving is not for you"!!! :eek:)
 
Both solutions worked, actually. Thanks again.
 
The formula field now gives me the converted Number but when I try to sum the converted field in the report footer the total is much much higher then it should. Any idea why?
 
did you figure this one out DPK99?

-Steve


"if at first you don't succeed, sky diving is not for you"!!! :eek:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top