how to prevent user to quit subform

Brahim

New member
Local time
Today, 22:39
Joined
Jun 21, 2003
Messages
8
Hi

i have a subform wich is used to insert Percentage of an activity, what i want is to prevent user to insert something greater or less than 100%!!! (sum(Activity Percent) should be 100%

Exemple:

Activity Code | Activity Desc | Activity Percent

01 | Programmer | 75%
02 | Analyst | 25%


------------------------>SumPercent = 100%

what i did on the ActivityPercent_exit i put the code to check the sumPercent but this one is not updated yet, bcoz we need to go to next record to get SumPercent updated

any idea how to solve this issue

please this is very urgent

thanks in advance
 
Do your checking on the BeforeUpdate event for eacjh field involved in the sum.
 
it 's not working :confused: :confused:

the problem is that the calculated field (text box) sumPercent is not updated when i am still in the Activity percent field this the trick problem

example:

Now: Activity Percent(Row1) = 75 || Activity Percent(Row2) = 50 but the SumPercent still = 75 (because access calcul this field after a go to the next row (Row3)
 

Users who are viewing this thread

Back
Top Bottom