
April 3rd, 2008, 03:49 PM
|
|
Registered User
|
|
Join Date: Apr 2008
Posts: 1
Time spent in forums: 4 m 55 sec
Reputation Power: 0
|
|
Restricted range of calculations in form
I am working on a new Access DB application and am having difficulty with one part; I have a form with several calculations that are computed on the fly. One of the calculation's solution must fall within a certain range of numbers. In this case it is between 0 and 50.
Logic= IF n > 50 then n = 50
OR n<0 then n = 0
Else n = n
Here is the formula I have at the moment:
=IIf(([85th % Speed]-[Speed Limit])*3.3>0 And ([85th % Speed]-[Speed Limit])*3.3<50,([85th % Speed]-[Speed Limit])*3.3,50)
The data that the fields hold is inputed by the user in a form that is tied to individual records in a table. The inputed data is not stored in the table, but instead exported to printable reports if the desire is there.
I am not a programmer by any means (mostly a web developer and network admin by trade), so I have no real skills in VB. I figure there is a way to do an If Then Else statement to do this, but I am not sure. Any help would be greatly appreciated.
|