Continuous Form: Updating display of a single cell

lution

Registered User.
Local time
Yesterday, 21:12
Joined
Mar 21, 2007
Messages
114
In my simplified example I have a continuous form with 2 columns:
curFine and curFinePenalty

By default curFinePenalty = curFine *.26 and I am able to change the value by doing this in the before update event for curFine:
Code:
me.curFinePenalty = me.curFine * .26

But the user is able to override the default value and put in something else.

After executing the above line, the display for the curFinePenalty doesn't update. If I add a me.recalc call in the afterupdate event for curFine, it updates every single row in the display, which can be 100's of rows. Is there a way to just update the display for the curFinePenalty on the current row?
 
How about basing your form on a query where the calculation is done in the query?
 
I did that for a total on the row but it also doesn't appear to update to show the new value unless I do a recalc which updates every row in the form.

Question to your response: User's need to be able to overwrite the default 26% value. If I create the calculation as part of the query, that will overwrite anything the users put in manually when it requeries and recalculates, won't it?
 
put a save in there and see if that helps - after update ...save
 
something is wonky on this unless i have missed it
 
Tell me about it ;-) Want me to upload a sample?
 
Hell shit no . its late here in the UK -

i can think of ways round this but as to a proper working solution -

my spin on this -you have two coloumns right - add a third column(field on th e table default vale = 0.26and use this in your calculation)
you would need an after update on field one and then on this default field
so when you enter the first figure it will do the calcuations - and then an after update on the 0.26 field if this is over written then recal
not pretty but should work ..
 
...Question to your response: User's need to be able to overwrite the default 26% value. If I create the calculation as part of the query, that will overwrite anything the users put in manually when it requeries and recalculates, won't it?
Actually if you do as I suggested then the user will not be able to override the 26%. I didn't realize this was one of the criteria. As for the curFinePenalty control updating, I believe the control should visibly update with the code you have in the AfterUpdate event of the curFine control. Maybe you *should* upload a sample db that exhibits the symptom. I believe something else must be going on. Do you have a Timer event running?
 

Users who are viewing this thread

Back
Top Bottom