Re: Currency conversion

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



hi Martha,

set the DATA TYPE to Currency instead of Number. If your data type is number and you want to format as currency but do not see it on the list, simply type it in...


Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day :)
*




mrodriguez wrote:

"Allen Browne" wrote:

Most objects in Access have only a limited number of properties, until you set them. If you test a field that has nothing in its Format property, you get error 3270. But if the field does have something in its Format property, it works.

That's why the previous reply concluded with the comment:
(using error recovery in case it does not exist.)

So, you need a piece of code that creates the property if it does not exist, and sets it if it does. SetPropertyDAO() is what I use. You can copy it from here:
http://allenbrowne.com/AppPrintMgtCode.html#SetPropertyDAO

As to what to set it to: set it manually to what you want. Then read the property, and use that string as the target.

There is an additional trap to watch out for with the Currency format if your users could have different regional settings:
http://allenbrowne.com/ser-44.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Steve Jensen" <SteveJensen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5A9601C7-2211-4909-B09C-10F1F0953EE6@xxxxxxxxxxxxxxxx
Allen, I have a function that loops through the properties of all the fields
in a given table; however, 'Format' is not one of the properties. I would
very much like to give the user the option of globally changing the format of
Currency fields to match their regional settings. It is easy if there is a
property one can set; but I can't find it.

This lists all the properties of currency fields in a given table:

Debug.Print "Properties of fields in " & _
.TableDefs(stTable).Name & " table:"
For Each fldLoop In .TableDefs(stTable).Fields
If fldLoop.type = 7 Then 'currency field
Debug.Print i & ". " & fldLoop.Name

For Each fldProp In fldLoop.Properties
On Error Resume Next

Debug.Print fldProp.Name & " - " & fldProp.Value

Next fldProp
i = i + 1
End If
Next fldLoop

Format is not one of the properties, and if it was, I don't know what value
to set for a format of Currency.

Can you help with this?

Thanks,
Steve

"Allen Browne" wrote:

It is possible to loop through the TableDefs, loop through the Fields of the
TableDef to locate the numeric fields, and test the Format property (using
error recovery in case it does not exist.)

"tedmi" <tedmi@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5C809210-9E88-438C-96ED-029BB3DDE2B5@xxxxxxxxxxxxxxxx
When you change the locale, every currency field's format gets changed
from
"Currency" to a custom format that includes the currency symbol of the
PREVIOUS locale. You have visit every currency field of every table to set
the format to the new locale's currency symbol. Major BUMMER!
HELP !!!!!!!!!!I am not a programmer, just recently went back to college, just purchased,and downloaded ultimate steal microsoft package....the very first homework assignment I turned in I'm geting dinged because the Format - under Field Properties won't give me currency--I was trying to build a database with a "Monthly fee" Field.....it shows currency as an option but on the dropdown, curency shows as an RM number..am not getting anywhere with tech support ---on phone or online....I.Ibought this laptop and the software seperate and now I can't even use it or get help .....can soemone give me a clue ...
Martha
.



Relevant Pages

  • Re: best practices.rounding
    ... Currency instead of Number, or to leave it as Data Type Number and use ... but on an overall format rather than a line by line format (if that makes ... just wondering what the pros do. ...
    (microsoft.public.access.gettingstarted)
  • Re: How to "POST" accounting data into underlying tables
    ... I'll switch the Data Type to ... I have a Receipts Allocation table in which the payment received for invoices ... caused by the use of the word "currency" in two ... Whether you select Currency or Number Data Type, amongst the Format ...
    (microsoft.public.access.macros)
  • Percent Field
    ... from Long Integer to Currency (data type - different than ... format) or Single or Double (field sizes of the number ...
    (microsoft.public.access.formscoding)
  • Re: If Values are the same, do nothing?
    ... Data Type for both is Currency as well as format in currency ... > control" get its value, and when is this code being executed? ...
    (microsoft.public.access.forms)
  • RE: Regional settings modification
    ... Country Text Indexed ... This application is intended for different countries and differend currency ... They are still derived from the regional settings. ... simply copied the pound symbol and used it in the format property for text ...
    (microsoft.public.access.modulesdaovba)