String to Interger

J

Jason Frazer

I have a field [estimated cost], the field size = 6, and
the data type is text. Unfortunatly the data type must
stay as text.
In a text box in my report i have "=CInt([estimated
cost])" without the quotes in the control source and
format set to currency. it always returns $0.00.
[Estimated cost] = "011000". The value returned should
be "$11,000"

What am i doing wrong.

Thanks

Jason
 
C

Cheryl Fischer

CInt() may not be the best idea; if your value evaluates to a number outside
the range -32,768 to 32,767 you will receive an error. Why not try setting
your text box properties as follows:

Control Source: =CCur([Estimated cost]
Format: Currency
Decimal Places: 0

Be sure the name of the textbox control on your report is not the same as
your field name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top