String to Interger

  • Thread starter Thread starter Jason Frazer
  • Start date Start date
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
 
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.
 
Back
Top