Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how to format a value in a query in access to a different curreny symbol

Posted on 2012-12-23
12
Medium Priority
?
751 Views
Last Modified: 2012-12-24
i want to get in a access query a currency value with another currency symbol and not the windows default. is that possible?

this is my code: Format(total,"Currency") AS TotalEx

if is not possible is there some way to add a word to a num value (visualy) like 100 with the word "euro"
0
Comment
Question by:bill201
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +3
12 Comments
 
LVL 26

Assisted Solution

by:jerryb30
jerryb30 earned 252 total points
ID: 38717525
Cab you not format the field as currency/euro in table design?
Otherwise, look here:

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_21695968.html
0
 
LVL 26

Expert Comment

by:jerryb30
ID: 38717527
Can you not....
0
 

Author Comment

by:bill201
ID: 38717561
thanks alot for your answer

i will be more specific i dont need a euro symbol (it's was an example) i need a Shekel symbol
like there http://en.wikipedia.org/wiki/Shekel_sign
where can i put this
format ([price],"shekel Symbol")
0
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
LVL 5

Assisted Solution

by:vguzman
vguzman earned 248 total points
ID: 38717749
Can you just concatenate the symbol and your price ? like:
"Shekel Symbol" & " " & [total]
0
 

Author Comment

by:bill201
ID: 38718412
but i want that it's will be a number value and not a text string
0
 
LVL 51

Assisted Solution

by:Gustav Brock
Gustav Brock earned 248 total points
ID: 38718534
If you concatenate a char and a number you will get a string.
If you also need the numerice value, have two columns.

/gustav
0
 

Author Comment

by:bill201
ID: 38718541
its not possible that the char will just be a format visualy?
0
 
LVL 93

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 252 total points
ID: 38718557
In your table design, select that column, and in Format for the column properties use something like this:

¿#,##0.00;(¿#,##0.00)

It worked for me.

Q-27976657.mdb
0
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 38718559
Yes, then you would use the Format property:

\€#,##0.00

Replace € with your Sekel sign (the font here seems not to hold it).

/gustav
0
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 38718561
That was supposed to be a shekel symbol, but it would not post.  The sample file uses the symbol correctly.
0
 
LVL 1

Accepted Solution

by:
jyk_aus earned 1000 total points
ID: 38719381
I use multiple currencies, including the shekel  regularly.

The way I approach this particularly problem is by having a 'Currencies' table that holds the currencies signs amongst other thing - the *minimum* you would need is:

[Currency_ID]  = PK
[Currency Name]
[Currency ISO] (eg USD, ILS, EUR etc), Required, zero length not allowed
[Currency Symbol]  - not required as some currencies don't have a specific symbol or I dont have symbols for such currencies.

All these fields are Indexed, duplications not allowed - you may allow duplication in the symbol but I would not recommend it.

If you are using more than one currency that uses the dollar sign and you allow duplications it is still  a good practice to distinguish beteen them by using US$, A$, C$, NZ$ etc  as symbol, the same gors for the franc sign, if you are using it.

I  have a public function, say CurrencySymbol(), that extrct the symbol using the  DLookup() and if it returns Null for the symbol it uses the [Currency ISO] as an alternative, e.g.

++++++++
Public Function CurrencySymbol( _
idCurrency As Long) _
As String

    Dim tmpSymbol As Variant, tmpCode As String
   
    tmpSymbol = DLookup("[Currency Symbol]", "Currencies", "[Currency_ID]=" _
    & idCurrency)
    tmpCode = Nz(DLookup("[ISO Code]", "Currencies", "[Currency_ID]=" _
    & idCurrency), "")
   
    CurrencySymbol = IIf(IsNull(tmpSymbol) Or Len(CStr(tmpSymbol)) = 0, tmpCode, _
    CStr(tmpSymbol))
   
   
End Function
+++++++++

In order to display the currency symbol in a query, I link the query to the currency table on [Currency_ID] and the rest is simple:

YourField=CurrencySymbol([Curreny_ID]) & Format(YourAmount,"#,##0.00")

Note: This assumes that *all* the currencies that you are using are sub-divisible by 100 (e.g 100 cents in a dollar, 100 agorot in a Skekel etc), if this is not the case, such as in Yen  and some other currencies, the query is slightly more compleicated  if you wish to eliminate the decimal for such currencies.

I hope that this is helpful

Best regards
Jacob
0
 

Author Closing Comment

by:bill201
ID: 38719517
thanks alot  for every one
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we’ll look at how to deploy ProxySQL.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question