Using The Current Value of a field, before it is saved

elsandalos

Registered User.
Local time
Today, 09:00
Joined
Jan 27, 2004
Messages
22
Hi all,
I've got a subform, fed by a query which contains a lot of calculated fields. All the calculations use the contents of a field on the main form.

What i want to do is have a live update, so that if i change the value of the field on the main form, the subform is requeried and the fields recalculated using the new value.

I've put a subform requery on the On Change event, but the requeried fields are coming out the same, presumably because the new value i have put in is not saved until i change record.

I'm using the control name in my calculations, and yet it's still picking up the old (saved) value from the underlying table - is there no way to tell Access to look at what resides in the control right now?

El.
 
Can you requery the subform from the after update event of the control on the mainform where you are changing the value?
 
Can you requery the subform from the after update event of the control on the mainform where you are changing the value?
 
That seems to work, but only when you move away from the field. Looks like the record is saved when i leave the field, rather than when i've changed record.

Thing is i was using On Change because i wanted the requery to happen whilst i'm still in the field (a live update), but because the field isn't saved until it loses focus, the requery happens with the old data.

So On Change knows that the field has just been changed, but there's no way to use the value in there

HMM ....

El.
 
Hum...

I'm guessing that any other way would be confusing. Say if you needed to enter 100, then you'd trigger a requery after the 1 then another trigger would fire after you type each of the zeros... Having the update occur after the field id actually updated seems the only logical way to do it... (I maybe missing something here :rolleyes: )
 

Users who are viewing this thread

Back
Top Bottom