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

Conversion 1

Status
Not open for further replies.

puforee

Technical User
Oct 6, 2006
741
US
Good morning.
I have a DB with a linked table. One of the field values the table contains is a number...formatted as text. Since it is a linked table I cannot change the field format to number.

I am trying to use the FormatNumber function in a table build query to change the text field to a number. When I run the query in Datasheet view..the conversion works and field shows as a number....however when I run the query normally it does produce the temporary table I want but the FormatNumber value from the query reverts to text again. I tried setting the table format to number and then repeating the load...still text.

Due to further operations in the DB...this value must be a number. And, I do not have control of the linked source table.

Help
 
When you say formatnumber function are you using Val()? If not, try Val(fieldname)
 
Thank you sxschech very much...works.

If Val() did what I needed...what is FormatNumber used for....reports and forms?
 
Glad it worked. I think that format is for visual purposes to have the number look a certain way such as with commas, decimals, percents, etc.
 
FormatNumber returns a String, Val a Double

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top