RE: Using the format function for a percent with four decimal plac

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thank you! That worked perfectly. Is there a way I can do this for currency,
too? If not, it's no big deal, it would just make me easier to add additional
expenses to each payment step.

Michelle

"Clifford Bass" wrote:

Hi Michelle,

Skip using the Format() function and try this for the Format property:

#,##0.0000%;;;"NONE"

Note the four parts, divided by semicolons (;). The first part is for
positive numbers, the second for negative number, the third for the zero
value and the fourth for null values. When a part is not specified, it will
default to the format defined in the first section.

Clifford Bass

"Michelle" wrote:

I used the format function to convert text to percentages, because I didn't
get any options in the properties drop-down formatting box in the design view
of my query.

I used the format function in a subquery, then I created another query which
pulled those percentages and I was able to select "4 decimal places" from the
drop-down properties box in this query.

I've created another query that pulls from the second query. I'm using the
IIf function in this one. I did that because the some loans only have one
payment through their lives and others have as many as four payment changes.
If a loan only has one payment during its life, I want the second, third,
fourth, and fifth interest rate fields to say "NONE". If it has more than one
payment, I want it to pull in the percentages for the new payments from my
other query.

My problem is that, once I put in the IIf function, my percentages pull in
like they're supposed to, but they now only have two decimal places and I'm
not able to change the formatting to get my four decimal places back.

Sorry for the long post. Can anyone help me?

Thanks,

Michelle
.



Relevant Pages

  • RE: Using the format function for a percent with four decimal places
    ... Skip using the Format() function and try this for the Format property: ... of my query. ... payment through their lives and others have as many as four payment changes. ... I want it to pull in the percentages for the new payments from my ...
    (microsoft.public.access.queries)
  • Re: formatting a calculated number field on a form
    ... > A query in an MDB file CAN call a user-defined function. ... > function name is Age and it returns a double. ... The user will certainly "notice" if a patient was born on Jan ... I just want control over the *display format* of a number ...
    (microsoft.public.access.forms)
  • RE: Query count then average.
    ... What was happening in my database was the query returned the ... "Ken Sheridan" wrote: ... It probably depends where you set the Format property. ... "Robert F." ...
    (microsoft.public.access.queries)
  • RE: Cannot get code to work for API Save Dialog Box
    ... I got it working to format correctly now. ... that table in my other queries and union query. ... The code is actually working by giving me the totals I need. ... The first spreadsheet placed where I told it to be contains the incorrect ...
    (microsoft.public.access.forms)
  • RE: Excel & MS Query caused compile errors
    ... My data is in an Excel file called ... The format of it were distorted after copying and pasting. ... Microsoft SQL Server 2000, which requires a server, VBA or Microsoft Query ...
    (microsoft.public.excel.programming)