473,396 Members | 1,923 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Formatting Issue

Hi:

I have, I hope, a trivial formatting issue.

I have a field that I wish to format as 12.30 (00.00). IN other words two digits decimal
point and two digits. Using the format command (in a query), I run into a snag:

When I set up the command as:
Format([SumOfW6TotHrs],"nn.nn")

It changes to : Format([SumOfW6TotHrs],"nn\.nn")

And the end result is that the output field always contains zeros.

I know I am doing something wrong, but don't know what it is.

Help appreciated.

John Baker
Nov 13 '05 #1
3 1500
Try:
Format([SumOfW6TotHrs],"00.00")

BTW, Format() outputs a string value, so that is not suitable for performing
further math on reliably.

--
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.

"John Baker" <jo********@comcast.net> wrote in message
news:3r********************************@4ax.com...

I have, I hope, a trivial formatting issue.

I have a field that I wish to format as 12.30 (00.00). IN other words two
digits decimal
point and two digits. Using the format command (in a query), I run into a
snag:

When I set up the command as:
Format([SumOfW6TotHrs],"nn.nn")

It changes to : Format([SumOfW6TotHrs],"nn\.nn")

And the end result is that the output field always contains zeros.

I know I am doing something wrong, but don't know what it is.

Help appreciated.

John Baker

Nov 13 '05 #2
Thank you. Just what I was after. For some reason I believed that n was the term for
numbers, but I guess I was wrong.

Thanks again

John Baker

"Allen Browne" <Al*********@SeeSig.Invalid> wrote:
Try:
Format([SumOfW6TotHrs],"00.00")

BTW, Format() outputs a string value, so that is not suitable for performing
further math on reliably.


Nov 13 '05 #3
Yes, n is for miNutes (because m is for Months.)

--
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.

"John Baker" <jo********@comcast.net> wrote in message
news:st********************************@4ax.com...
Thank you. Just what I was after. For some reason I believed that n was
the term for
numbers, but I guess I was wrong.

Thanks again

John Baker

"Allen Browne" <Al*********@SeeSig.Invalid> wrote:
Try:
Format([SumOfW6TotHrs],"00.00")

BTW, Format() outputs a string value, so that is not suitable for
performing
further math on reliably.

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: brAccess | last post by:
I recently installed Access 2003 and immediately noticed problems with applications that work fine in 2000 and XP. I use conditional formatting on continuous forms for a number of reasons. When...
2
by: Megan | last post by:
Can you write conditional VBA code that affects only one or two records on a continuous subform? I have a form with a subform on it. The parent/ child field that links the forms is CaseID. The...
2
by: Alan | last post by:
I have a database I created on a network share when I print a report from my computer the printed copy contains the colors specified in conditional formatting but if I go to another computer on the...
2
by: Von Bailey | last post by:
I have a form where the conditional formatting is set on some fields to bold if certain conditions are met. However, when the conditions are met some of the data that is to bold is either not...
5
by: Andrew Chanter | last post by:
Does anyone know a way you can use conditional formatting to create a banded style view as is commonly seen on the internet. (In othe words the first record appears on a gray background, the 2nd...
9
by: sck10 | last post by:
Hello, I have a page with an ImageButton that is used to redirect to another page. When the page first opens, everything looks as expected. However, when I click on the image, the new page...
8
by: gopal | last post by:
Hi I am trying to write to log file but the formatting of string is not properly aligned in log file result The results looks some thing like this OK move.xml Successful OK ...
5
by: CarrieR | last post by:
I am working within a DB I have been devolping in Access 2003, and have encountered a report coding issue I was hoping someone could help me with: I have 18 reports, each running off some smaller...
2
by: =?Utf-8?B?VG9jbw==?= | last post by:
Hello. My goal is to pain the entire row fore color as Red. If the value of column 24 is true (boolean), I wish to paint the row as Red. Otherwise, leave row as default (no formatting). The...
6
by: Tomasz J | last post by:
Hello developers, I bind my TextBox control specyfying a format stored in my application global ApplicationContext object - it has a static string CurrencyFormat property. The problem - this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.