current month data

R

RSara

Hi! Hope you could help. I created a form w/ subform data display. In the
subform I want the current month information to display. And...from that
display I want to add the value given to each data added to each employee.
Thanks for your help!
 
J

John Vinson

Hi! Hope you could help. I created a form w/ subform data display. In the
subform I want the current month information to display. And...from that
display I want to add the value given to each data added to each employee.
Thanks for your help!

1. Use a Query with a criterion on the datefield of
= DateSerial(Year(Date()), Month(Date()), 1) AND < DateSerial(Year(Date()), Month(Date()) + 1, 1)

2. Explain what value you mean, what data you mean, and what you're
trying to accomplish. "that display" *is* just a display; it's not
data (yet).


John W. Vinson[MVP]
 
R

rsara

Sorry for the confusion..
Okay. I created a form with a subform. The main form has all the
information of the employess which also includes a given or month end weight.
For example, an employee could be at weight 73.5. This particular employee
is able to receive more work because he/she has not reached 100%. In the
subform he/she is assigned work. Each assignment is given a certain weight,
such as 4.0, 3.75 etc. I want to add the weight of 4.0 (which is the work
assigned to employee) to the monthly weight of 73.5 (which is the month end
weight). Leaving me with the total current weight as work is being assigned
to them.
 
J

John Vinson

Sorry for the confusion..
Okay. I created a form with a subform. The main form has all the
information of the employess which also includes a given or month end weight.
For example, an employee could be at weight 73.5. This particular employee
is able to receive more work because he/she has not reached 100%. In the
subform he/she is assigned work. Each assignment is given a certain weight,
such as 4.0, 3.75 etc. I want to add the weight of 4.0 (which is the work
assigned to employee) to the monthly weight of 73.5 (which is the month end
weight). Leaving me with the total current weight as work is being assigned
to them.

So the subform might have several records, each with a weight? Is the
4.0 or 3.75 in units of percent? What's the 73.5 and how does it come
into it?

If you just want to see the sum of all the weights displayed in the
subform (which, given a proper query as the subform recordsource,
would be all the weights in the current month), put a textbox
(txtSumWeight) on the Subform's Footer with a control source

=Sum([weight])

Then put a second textbox on the mainform with a control source

=[MonthEndWeight] + Val(subMySubform.txtSumWeight)

assuming that the existing mainform control is named MonthEndWeight
and that the Name property of the subform control is subMySubform.

John W. Vinson[MVP]
 
Top