Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format a number

Status
Not open for further replies.

tamer64

IS-IT--Management
Aug 27, 2007
120
US
I have a query which sums a field which is a number. How do I format it so it shows single digits as 08, 09, 10 and so on instead of 8, 9, 10.

SELECT T_099_Equip_Maintenance_Table.Equipment_Type, Sum(T_099_Equip_Maintenance_Table.Tag) AS DesktopTotal
FROM T_099_Equip_Maintenance_Table
GROUP BY T_099_Equip_Maintenance_Table.Equipment_Type
HAVING (((T_099_Equip_Maintenance_Table.Equipment_Type)="Desktop"));
 
I typically don't format anything in a query. I reserve the formatting to the form or report displaying the value. However, you could try:
Code:
Format(Sum(T_099_Equip_Maintenance_Table.Tag),"00") AS DesktopTotal

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top