A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

convert to number



 
 
Thread Tools Display Modes
  #1  
Old April 30th, 2008, 05:24 PM posted to microsoft.public.access.queries
Rich[_14_]
external usenet poster
 
Posts: 13
Default convert to number

When defining a field being used in a query, how do I convert it's
format from Currency ( typical ex. $12,575.22), to the straight number
12575.22 (preferrably without a comma after the 12)
thanks for the help
Rich
  #2  
Old April 30th, 2008, 06:02 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default convert to number

Rich wrote:

When defining a field being used in a query, how do I convert it's
format from Currency ( typical ex. $12,575.22), to the straight number
12575.22 (preferrably without a comma after the 12)



If you want to display a number with a specific format, then
specify the desired format in the Format property of the
object that displays the number field. If you feel some
urge to format it in the query's datasheet then specify the
desired format in the query field's Format property. If the
number will be displayed in a form or report text box, then
specify the desired format in the text box's Format
property.

See Format Property in VBA Help for details on creating
custom formats. I think you want to use
0.00

--
Marsh
MVP [MS Access]
  #3  
Old May 1st, 2008, 01:17 PM posted to microsoft.public.access.queries
Rich[_14_]
external usenet poster
 
Posts: 13
Default convert to number

On Apr 30, 1:02*pm, Marshall Barton wrote:
Rich wrote:
When defining a field being used in a query, how do I convert it's
format from Currency ( typical ex. $12,575.22), to the straight number
12575.22 *(preferrably without a comma after the 12)


If you want to display a number with a specific format, then
specify the desired format in the Format property of the
object that displays the number field. *If you feel some
urge to format it in the query's datasheet then specify the
desired format in the query field's Format property. *If the
number will be displayed in a form or report text box, then
specify the desired format in the text box's Format
property.

See Format Property in VBA Help for details on creating
custom formats. *I think you want to use
* * * * 0.00

--
Marsh
MVP [MS Access]


I may not have been as clear as I could have been.... For the purposes
of one particular query, I want to display a currency field, as a
number, with 2 decimal places. If the situation was reversed, I
suppose I could define a number formatted field as CCur[FieldName] and
have the query display it in currency format, but how do I acheive the
opposite?
Rich
  #4  
Old May 1st, 2008, 05:13 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default convert to number

Rich wrote:

On Apr 30, 1:02*pm, Marshall Barton wrote:
Rich wrote:
When defining a field being used in a query, how do I convert it's
format from Currency ( typical ex. $12,575.22), to the straight number
12575.22 *(preferrably without a comma after the 12)


If you want to display a number with a specific format, then
specify the desired format in the Format property of the
object that displays the number field. *If you feel some
urge to format it in the query's datasheet then specify the
desired format in the query field's Format property. *If the
number will be displayed in a form or report text box, then
specify the desired format in the text box's Format
property.

See Format Property in VBA Help for details on creating
custom formats. *I think you want to use
* * * * 0.00


I may not have been as clear as I could have been.... For the purposes
of one particular query, I want to display a currency field, as a
number, with 2 decimal places. If the situation was reversed, I
suppose I could define a number formatted field as CCur[FieldName] and
have the query display it in currency format, but how do I acheive the
opposite?



Since a currency field is a kind of number, all the number
formats apply and there is no need to convert a currency
type just to format it. If the field were a Text field,
then you would need to convert it and converting it to
currency would probably be the best way to handle it.

Did you try setting the text box's Format to 0.00? If you
did, what happened? If you did not try it, give it a shot
and see what happenes.

--
Marsh
MVP [MS Access]
  #5  
Old May 2nd, 2008, 04:29 PM posted to microsoft.public.access.queries
Rich[_14_]
external usenet poster
 
Posts: 13
Default convert to number

On May 1, 12:13*pm, Marshall Barton wrote:
Rich wrote:
On Apr 30, 1:02*pm, Marshall Barton wrote:
Rich wrote:
When defining a field being used in a query, how do Iconvertit's
format from Currency ( typical ex. $12,575.22), to the straight number
12575.22 *(preferrably without a comma after the 12)


If you want to display a number with a specific format, then
specify the desired format in the Format property of the
object that displays the number field. *If you feel some
urge to format it in the query's datasheet then specify the
desired format in the query field's Format property. *If the
number will be displayed in a form or report text box, then
specify the desired format in the text box's Format
property.


See Format Property in VBA Help for details on creating
custom formats. *I think you want to use
* * * * 0.00


I may not have been as clear as I could have been.... For the purposes
of one particular query, I want to display a currency field, as a
number, with 2 decimal places. *If the situation was reversed, I
suppose I could define a number formatted field as CCur[FieldName] and
have the query display it in currency format, but how do I acheive the
opposite?


Since a currency field is a kind of number, all the number
formats apply and there is no need toconverta currency
type just to format it. *If the field were a Text field,
then you would need toconvertit and converting it to
currency would probably be the best way to handle it.

Did you try setting the text box's Format to 0.00? *If you
did, what happened? *If you did not try it, give it a shot
and see what happenes.

--
Marsh
MVP [MS Access]- Hide quoted text -

- Show quoted text -


Thanks Marsh....I appreciate you taking the time to help me .
Rich
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.