Making a calculation with a Text field

  • Thread starter Thread starter HM
  • Start date Start date
H

HM

Greetings all,

Im pulling data from an ODBC data source and I want to multiply the contents
of a field that is entered as a number, but the field is specified as a
'Text' data type. I can't change the table. Is there a way to have Access
2000 see that field as a number so that I can do a calcuation off of it?

Thanks in advanced

HM
 
If the numeric value has decimal places, you can use the CDbl () function:

CDbl([MyTextValue]) * <whatever>

If the numeric value is without decimals, you could use the CLng ()
function:

CLng([MyTextValue]) * <whatever>


hth,
 
Thank you very much!


Cheryl Fischer said:
If the numeric value has decimal places, you can use the CDbl () function:

CDbl([MyTextValue]) * <whatever>

If the numeric value is without decimals, you could use the CLng ()
function:

CLng([MyTextValue]) * <whatever>


hth,
--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


HM said:
Greetings all,

Im pulling data from an ODBC data source and I want to multiply the contents
of a field that is entered as a number, but the field is specified as a
'Text' data type. I can't change the table. Is there a way to have Access
2000 see that field as a number so that I can do a calcuation off of it?

Thanks in advanced

HM
 
Back
Top