Reports from subform

  • Thread starter Chris75 via AccessMonster.com
  • Start date
C

Chris75 via AccessMonster.com

Hello,

I have no idea if this is at all possible.

I have a form with employee details, it is call Employees. Within this form,
I have three subforms. One for scheduling, called Schedule. One for
productivity, called Productivity and I also have a subform for workload
assignment, this subform is called Assignment.

Now I have a productivity report that gives me statistics based on the
previous week's work. Each employee is assigned a different workload. Each
workload has different standards to meet.

What I would like to do is the following. Based on the workload assigned a
particular day (or week), I would like to set the conditional formatting in
my productivity report such that if a person is below the norms, it would
appear as red.

To simplify the above. If Bob is assigned to work in Bin 1, and Bin 1 has a
standard of 11 widgets. I would like the productivity report (which is
generated by data entered in the Productivity table\subform), to have a
conditional formatting showing whether Bob met the standards or not, not
being that Bob's stats appear in red.

Thank you.
 
J

Jackie L

Chris,

It sounds like the report is working as intended and you just need the
conditional part. If that is the case, on the OnFormat event of the section
on your report (probably the Detail section) put code similar to the
following (where the fields BobNumber and BinStandard exist in the detail
section of the report).

If Me.BobNumber > Me.BinStandard Then
Me.BobNumber.ForeColor = 0
Else
Me.BobNumber.ForeColor = 250
End If
 
C

Chris75 via AccessMonster.com

Hi Jackie,

Would this code take into account that report is based on the productivity
subform and not the assignment subform?

By BobNumber I assume you mean the statistics, but the BinStandard is not on
report. In a sense I want to keep that hidden.

One other thing. Employees could change Bins on a daily basis, how would the
code take that into account seeing as each Bin has a different standard?

Thanks.

Jackie said:
Chris,

It sounds like the report is working as intended and you just need the
conditional part. If that is the case, on the OnFormat event of the section
on your report (probably the Detail section) put code similar to the
following (where the fields BobNumber and BinStandard exist in the detail
section of the report).

If Me.BobNumber > Me.BinStandard Then
Me.BobNumber.ForeColor = 0
Else
Me.BobNumber.ForeColor = 250
End If
[quoted text clipped - 26 lines]
Thank you.
 
C

Chris75 via AccessMonster.com

To elaborate further.

Stats are compiled by the week. So for example, I would have the
productivity stats for the week of October 5th. Assignments are done daily.
As stated earlier, this is done in separate subforms.

What I want to show is depending on where an employee worked that week, how
their stats relate to the Bin standard for whatever Bin they worked in. Of
course, an employee could work in more than one Bin in a week, therefore I
would want the standards for all applicable Bins. I think the issue is that
I want this to be shown on my productivity report, but the linked information
for Workload comes from a subform that is not used in the construction of my
productivity report.

Thank you.
Hi Jackie,

Would this code take into account that report is based on the productivity
subform and not the assignment subform?

By BobNumber I assume you mean the statistics, but the BinStandard is not on
report. In a sense I want to keep that hidden.

One other thing. Employees could change Bins on a daily basis, how would the
code take that into account seeing as each Bin has a different standard?

Thanks.
[quoted text clipped - 15 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top