If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
string functions
I have a table with a column called qty that has numbers like this 3245.1823 I want to use an update query to get rid of the decimal place and everything past it. Next, I want to make all of the numbers 7 digits by adding leading zeros. The numbers are not the same lenght. What is the best way to accomplish this?
|
#2
|
|||
|
|||
string functions
On Mon, 7 Jun 2004 12:26:11 -0700, Chris Moore wrote:
I have a table with a column called qty that has numbers like this 3245.1823 I want to use an update query to get rid of the decimal place and everything past it. Next, I want to make all of the numbers 7 digits by adding leading zeros. The numbers are not the same lenght. What is the best way to accomplish this? Splitting the field is easy. Update YourTable Set YourTable.[NewField] =Fix([Qty]); Why do you need leading zeros in a number field? Access does not store leading zeros. If the field name is [Qty] I assume you will need that value as a number for calculations, so storing it as text (which does store leading zeros) would be counter productive. Store the value without the leading zeros. Whenever you need to display the field, set that control's Format property to 0000000 or use =Format([NewField],"0000000") -- Fred Please only reply to this newsgroup. I do not reply to personal email. |
Thread Tools | |
Display Modes | |
|
|