Formulas in a form

Payal Patel

Registered User.
Local time
Yesterday, 19:06
Joined
Nov 3, 2009
Messages
34
Hi,
I have created a form what allows you to enter how many hours an employee has worked a week. There is a column for Reg hours, OT hours, and DT hours. Is there a way (maybe by a command button using a query) where if I type in 48 hours in REG , it will automatically put 8 as OT and 40 as reg?
Thanks,
P.
 
You can achieve this a number of ways.

On the Form Control (text field) you enter the value you can have an event in the After Update, or On Exit Event of the Control that either, activated a Macro or VBA Code to either, change the Value you just entered from 48 to 40 and place the difference in another field on a table or, if you are using an Unbound Control, place both the 40 and the 8 in their relevant fields.

Which ever way you choose, just consider the steps and work through them.

Check out the Properties of a Control on a Form and see the variety of Events that can be stored on your form.
These Events are all stored in the Form but cover The Form itself ie On Open, On Current etc and Each of the Controls (fields) you place on the form including any Command Buttons. A form with say 10 Controls could have 100's of places to store Events to perform tasks like yours.
 
thank you for your help : )
 

Users who are viewing this thread

Back
Top Bottom