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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I 4

Status
Not open for further replies.

Lhuffst

Programmer
Jun 23, 2003
503
US
I have an odd request from the customer. One of the fields is total gallons which can be hundreds, thousands or more
This is not a problem.

Now they want to add another field that shows only the thousands of gallons based on the first field. How do I do that?

for example

Total Gal: 181700 Thousands Only: 181
Total Gal: 700 thousands Only: 0
etc.

Do I check length and divide by 1000?
thanks
 
Why would you check the length? It's a NUMBER, which has no "length."

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
You don't have to store the value, just add a text box with a control source of:

Code:
=[total gallons]\1000

Duane
Vevey, Switzerland
Hook'D on Access
MS Access MVP 2001-2016
 
dHookom.
That's what I tried originally

Total Gals: 132580 puts thousands as 132.58

I only want the 132
 
I moved the formula to the form on current

I changed the text box
decimal places: 0
format : 0000

This looks now
Thanks
 
If you would try exactly what Duane is suggesting, you would get the value of 132 back
Pay attention to the division sign: \ (not /)

Have fun.

---- Andy

There is a great need for a sarcasm font.
 
Integral division.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Thanks to Duane and Skip. I don't think I've ever personally seen or used that setup before. Good to know in case I need it in the future.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top