473,405 Members | 2,338 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,405 software developers and data experts.

Field is Decimal and I want to Zero Fill

31
I have a table that is named “field14" that is set to
Data Type: Currency
Format: Fixed
Decimal Places: 2

This field is populated correctly but I want to convert the currency to 14 digest with zero fill. Example: "2.20" would be "00000000000220" I have tried an update query with format but it didn't work. Any suggestions?
Thanks,
Wayne L
Dec 17 '07 #1
5 4390
Rabbit
12,516 Expert Mod 8TB
You'll have to change your field to text. You can't store it as a number.
Dec 17 '07 #2
Wayne L
31
You'll have to change your field to text. You can't store it as a number.
Rabbit,
I have tried to change it to text but it converts back to a decimal. I am importing a .dbf file into the Access database. The field actually has 4 decimals to the right. example: 2.2050 this is converted to 2.20 when imported. I need to zero fill and read 220 as 00000000000220. I have created a temp table and append the master table to convert it to text but it changes back to the 4 decimal places??
Wayne
Dec 17 '07 #3
NeoPa
32,556 Expert Mod 16PB
Create a separate (text) field then use an UPDATE query to populate this new field. The Format() function can be used to lay the data out correctly.
Your example data was not very clear though. You say 20 digits but how do you want it to handle the decimals? Like a multiplication by 10,000? Simply strip the decimal point wherever it appears in the source?
Dec 17 '07 #4
Wayne L
31
Thanks for the input. I am taking the approach of multiplying to remove the decimal and then zero fill with an update query.
Thanks again for you input.
Wayne
Dec 18 '07 #5
NeoPa
32,556 Expert Mod 16PB
No problems Wayne.
I take it from your post that you're sorted now yes?
Dec 18 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: Batista, Facundo | last post by:
Here I send it. Suggestions and all kinds of recomendations are more than welcomed. If it all goes ok, it'll be a PEP when I finish writing/modifying the code. Thank you. .. Facundo
6
by: Peter Blatt | last post by:
Does 5 represent the total numer of digits (including the fractional portion) or only the number of places BEFORE the decimal point? Moreover does the number include the decimal point? Are there...
1
by: stuart | last post by:
I am trying to format a number in an unbound text field using the following format statement in the field's Exit event: txt11UnitWeight = Format(txt11UnitWeight, "00000.00") I want the number...
10
by: Peter Piper | last post by:
A Quick question if someone could help, im sure this has been asked before, but googling is getting me now where slowly. Is it possible to get an unsigned 32 bit integer field in Access. Im...
8
by: Tony Williams | last post by:
I have a form where the user inputs a series of figures into a number of controls. After they've input the total (they don't want the program to create the total) there is a check to make sure the...
29
by: Gaijinco | last post by:
Sooner or later everytime I found recreational programming challenges I stumble with how I test if a number is has decimal places differnt than 0? For example if I want to know if a number is a...
5
by: Dan C Douglas | last post by:
I have just installed VS.NET 2003 on my computer. I have a project that I have been developing on VS.NET 2002. I haven't upgraded this project to VS.NET 2003 yet and I am still developing it in...
9
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
4
by: janssensglb | last post by:
I want to export from Access 2000 a numeric field (double) to a text file. The export file should be fixed length (no delimiters), the field should have 9 digits in total, including 2 decimals. I...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.