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

limit answer in access calculated field

8
Hi, I have a calculated field in access form which computes the percent progress:

The formula I have used is:
Expand|Select|Wrap|Line Numbers
  1. Percent Progress = (Date()-([Planned Start Date]-1))/[Activity Duration]
and this working fine.

But I want the answer to stop at 100% when it reached 100%.. and will not continue as days increasing it will reached 200%, 300%, etc higher.

Anyone who could help me please..
Oct 12 '11 #1

✓ answered by Narender Sagar

One of the option is using IIf function.
If Percent progress is more than 100%, Value if True: "100%", Else : show Percent Progress itself.
Expand|Select|Wrap|Line Numbers
  1. NewPercent: IIf([PercentProgress]>100%,"100%",[PercentProgress])
So you can hide main formula in the form and show only NewPercent

9 2399
Narender Sagar
189 100+
One of the option is using IIf function.
If Percent progress is more than 100%, Value if True: "100%", Else : show Percent Progress itself.
Expand|Select|Wrap|Line Numbers
  1. NewPercent: IIf([PercentProgress]>100%,"100%",[PercentProgress])
So you can hide main formula in the form and show only NewPercent
Oct 12 '11 #2
NeoPa
32,556 Expert Mod 16PB
You don't explain the logic behind your formula, so that just makes it harder to explain the answer to you.

Use IIf() to check the Date() value is < that value which would indicate 100% in your logic. If that isn't clear then you need to work harder at making your question make sense before you post it.
Oct 12 '11 #3
rncr
8
Thank you, Narender. Got your point, thanks for the idea. It is now working so fine. Thanks a lot!
Oct 23 '11 #4
Narender Sagar
189 100+
Can you please inform, what exactly you have written and where? You can do do it in a query.
Sorry there is missing brackets in the formula I have given :
Expand|Select|Wrap|Line Numbers
  1. NewPercent: IIf([PercentProgress]>100%,"100%",[PercentProgress])
Just place a ( after IIF
Oct 23 '11 #5
rncr
8
Sorry Narender, I have just forgot to change the word "Percent Progress" as I have saved it differently. It is now working fine.. Thanks a lot for your help
Oct 23 '11 #6
Narender Sagar
189 100+
Good to know its working.. :)
Oct 23 '11 #7
rncr
8
Hi Narender, I would like to get your kind help for the database I am creating now.. I have a field "Action" which is a look-up wizard and will type later the values I want. What I need is, to track all the action of a person. For example I would make a record for Person A then I would need list down all actions needed for him. I would like to use the field "Action" many times. I like to put command button beside "Action" then when I click it, it will add below the field "Action" then I can input into it, repeating this how many time and so Person A will have multiple actions on the record. I have tried to create different fields namely Action1, Action2, Action3, etc but then in the end I don't know how I can create report to show only those pending action/s per Person
May 30 '12 #8
Narender Sagar
189 100+
Dear rncr,
I and other members of Bytes, will definitely help you, but as per site rule, you should start new thread for your new question. That will be helpful for other people also, who will search for similar kind of problem.
hope you understand this.
regards..
May 30 '12 #9
rncr
8
no worries, already posted new thread here: http://bytes.com/topic/access/answer...ut#post3720191. thank you
May 30 '12 #10

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

Similar topics

14
by: Allen Browne | last post by:
Subform is based on a single-table query that contains a calculated field: Amount: Round(CCur(Nz(*,0)),2) Continuous subform displays this field in a text box named Amount. As user enters new...
2
by: Manfred | last post by:
Hi Would like to add a new Field to Table which is 75 % (or another Percentage) higher than the Value in another Field in same Table.Is this possible with Expression or would I have to enter the...
1
by: Miguelito Bain | last post by:
hi everybody. i'm trying to find out what you can and can't do with/in calculated fields. any help, pointers, and/or advice would be greatly appreciated. i'm a newbie, but i want to learn, and...
2
by: hhathome | last post by:
In my report I have a calculated DateDiff Field, I also have a calculated count field. I'm trying to get a total of the DateDiff field and dividing it by the count field and I'm having problems --...
2
by: Joe Befumo | last post by:
I've got an asp page that creates fields on the page based on database information, so I don't know which fields will be there, but I do know the formula for devising the field names. I'd like to...
2
by: John | last post by:
I am using Access 2000. One table in my database has a field called RankName. Values inlcude: Officer, Sergeant, Lieutenant. I need create a report that groups these three RankNames into two...
3
by: kelley.l.turner | last post by:
Hi all, I am very new to MS Access so please bear with me! I have created a simple calculated field in my data entry form, yet when I view my data table or try to generate a report based on...
5
by: Henrik | last post by:
The problem is (using MS Access 2003) I am unable to retrieve long strings (255 chars) from calculated fields through a recordset. The data takes the trip in three phases: 1. A custom public...
3
by: myemail.an | last post by:
I use Access 2007 and create queries with a number of calculated fields/expressions (I'm still a novice so please forgive me if my wording is imprecise...), like: MyCalculation = Field1 - Field2. ...
2
by: mkbrady | last post by:
I have a query that includes calculated fields that generate numeric results. I have wrapped conversion functions CLng() and CDdl() around the calculated fields to ensure the data types are...
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...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.