Form Calculations

RustyRick

Registered User.
Local time
Yesterday, 19:25
Joined
Jan 31, 2013
Messages
123
I have a form where I enter 4 numeric numbers which HAVE TO 1) total 24 (hrs in a day) and 2) - 2 of the 4 can't exceed 14.

These numbers are not stored in the data base. They are just there to visually indicate to the data entry person that the numbers are correct and without error and do it fast without having to think. :-)

So I have 2 fields totalling and conditionally formatting these 2 calculations.

However, as I tab through them they won't calculate until I click in a entry field. They don't fire on the tab.

Can I default the form to start calculating Automatically with data input or make it "live" somehow?
 
in the on change event or afterupdate event for each control on the form put

me.requery
 
I'm obviously missing something

Private Sub Driving_Change()
Me.Requery
End Sub

This comes up with a Yellow because it doesn't like this.
 
Not sure why, it works for me. What error message does it come up with?
 
Well that improved things so it calculates on the tap. But not until the last of 4 tabs. So yes thanks, that is an improvement. Don't need to reach for the mouse anymore.

However won't Access calculate "live" like Excel does?

I have 4 fields in a row and in tab order. The first 2 have a default number in them and the last 2 are different every time.

So in my unbound calculations boxes I'd like to see the current calculation.
 
you have to code the calculation for the afterupdate event of each separate value.

access isn't excel. even so, it will calculate "live" - but it is achieved by a somewhat different technique

excel doesn't do it automatically. you have to add a cell with formula =a4+b4+c4+d4 (say). so with access, but the technique is different
 

Users who are viewing this thread

Back
Top Bottom