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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|