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!

summing up an extracted field

Status
Not open for further replies.

atadbitslow

Programmer
Feb 26, 2001
301
US
I have an expression (#ofwks) in my report's controlsource query that extracts the last number from a text field (also in the query), ie text field is 3-5, the expression (#ofwks)= 5. I want to be able to sum up the expression field (#ofwks)which I've located on my report, but it keeps telling me that it is an invalid data type. I tried changing the format of the expression in the query properties to general number but it doesn't stay that way.

Can you extract data from a text field and make it a number field??

Thanks!
 
Trying wrapping your field in a Cint function then doing the sum.

So Cint(#ofwks) should give you a numeric value to sum on.

HTH,

Steve
 
Thanks, when I try to use =sum(Cint([#ofwks])) to get the sum, I get the message about it being too complex to evaluate.....
 
If you just do the Cint does that part work?

If so create another query to get the sum you are looking for.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top