Results 1 to 3 of 3
  1. #1
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085

    Split Currency Field


    I have a report that prints on a Government form. The form has the currency in 2 specific positions for dollars and cents. I have the query the report is based on to get the dollar portion but not sure how to get the cents portion anybody have an idea?

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    there are a few ways you can retrieve the cents portion of a currency value
    maybe something like:

    right(cstr(CurrencyValue), len(cstr(CurrencyValue)) - instr(cstr(CurrencyValue), "."))

    depending on how your currency value is stored it might be as easy as

    right(cstr(currencyvalue), 2)

    you can also do it strictly with number values with something like

    (CurrencyValue - int(CurrencyValue)) * 100

  3. #3
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    Thanks Rpeare that was what I needed.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Problem in the field of currency
    By azhar2006 in forum Forms
    Replies: 6
    Last Post: 01-23-2014, 02:50 PM
  2. Search form currency field can't use .00
    By wnicole in forum Forms
    Replies: 1
    Last Post: 01-21-2014, 11:10 AM
  3. currency field in form
    By azhar2006 in forum Forms
    Replies: 5
    Last Post: 01-16-2014, 03:05 PM
  4. formatting a field to be currency in VBA
    By Lupson2011 in forum Forms
    Replies: 8
    Last Post: 06-25-2012, 08:02 AM
  5. Replies: 2
    Last Post: 03-23-2011, 11:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums