MS Access Scenario:
I am using a form (we'll call it the select_contract form
) and a subform (we'll call it the employee_allocations_by_contract subform
).
The select_contract
form:
- Is unbound.
- Contains a combobox that allows the user to select a contract id.
The employee_allocations_by_contract
subform:
- Is a continuous form.
- Is bound to a table (which I'll call the
hours_allocation
table) that contains the number of hours that each employee is allocated to each contract. - Binds only one field, the
employee_id
field, to thehours_allocation
table. The row source for this field is a query that returns the ids of employees that have hours allocated to the contract that the user has selected in theselect_contract
form. - Contains twelve other, unbound fields, one for each month of the year. These fields are intended to display the number of hours allocated to the employee listed in the
employee_id
field for each month of the year.
The Problem: In order to display the number of hours by month that are allocated to each employee listed on the employee_allocations_by_contract
subform, the queries for each month field need access to the employee_id
field of the row on which they appear. I haven't been able to figure out how to reference this field. Because the employee_allocations_by_contract
subform is a continuous form, a reference to the the employee_id
field name appears to reference each row on the form.
I have searched several forums and have found related continuous form issues, but nothing that clearly addresses this problem. Any thoughts?