UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Rounding down & functions    
 
   
RobH
post Aug 13 2005, 01:07 AM
Post #1

New Member
Posts: 17



I have a table which stores numbers between 0 and 99.
I would like these values to be displayed as numbers between 1 and 20.

I have tried using an expression on the text box along the lines of:
=([number]/5)

However, this has returned an error.
What I would like it to return is something like the following:

For example - 0 to 4 would return 1, 5 to 9 would return 2 and so on...

Any ideas on how I could implement this? As I will be using the same thing multiple times it wouldn't be practical to have a table used for each conversion.

Cheers,
Rob.
Go to the top of the page
 
+
craigo
post Aug 13 2005, 02:14 AM
Post #2

UtterAccess Enthusiast
Posts: 70



Rob,

You can do this using the \ Operator.

Example:

x = 0
? x\5 + 1
1

x = 99
? x\5 + 1
20

HTH - craigo


Go to the top of the page
 
+
RobH
post Aug 13 2005, 08:07 AM
Post #3

New Member
Posts: 17



That doesn't seem to have done the trick, still returns an error message I'm afraid.
Go to the top of the page
 
+
Gecko
post Aug 13 2005, 08:30 AM
Post #4

UtterAccess Veteran
Posts: 435
From: Pax River, MD



What is the datatype of the [number] field? Make sure it is a number and not text.

HTH,
Go to the top of the page
 
+
craigo
post Aug 13 2005, 11:15 AM
Post #5

UtterAccess Enthusiast
Posts: 70



What error message is it returning?

craigo
Go to the top of the page
 
+
RobH
post Aug 13 2005, 11:54 AM
Post #6

New Member
Posts: 17



The field type is a number. All the text box returns is '#Error'.
Go to the top of the page
 
+
truittb
post Aug 13 2005, 02:11 PM
Post #7

Retired Moderator
Posts: 13,544
From: Texas (Is there anywhere else?)



Is the name of your textbox the same as the field you are using in the calculation? If it is change the name of the textbox so they aren't the same.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 20th May 2013 - 01:45 AM