J
J. Trucking
Hello,
I have an existing form with employee data. I have just finished
building a query that is a summation of the hours that an employee has
worked at the company. It is a totals query so it always returns one
answer. What I would like to do is have the results of the query
appear in the Employee Form (frmEmployees) that I have created. The
query and form share the common field EmployeeID. Therefore on the
query, I said the criteria for the EmployeeID was to be [Forms]!
[frmEmployees]![EmployeeID]. When I double click the query and insert
an Employee ID, it gives me the right number. So I went into the form
and created a text box. The form itself is based on tblEmployees, so
I went into Properties of the text box, and under control source, put:
[qryEmployeesTotalHours]![SumOfHoursWorked]
When I open the form, the text box has #Name? in it.
Does anyone know what the propblem is? What I am trying to do is have
it recaculate as the user scrolls through the records (different
employees) of the Employees Form. Any help would be greatly
appreciated. If I have posted this in the wrong forum, please let me
know.
Thanks,
John
I have an existing form with employee data. I have just finished
building a query that is a summation of the hours that an employee has
worked at the company. It is a totals query so it always returns one
answer. What I would like to do is have the results of the query
appear in the Employee Form (frmEmployees) that I have created. The
query and form share the common field EmployeeID. Therefore on the
query, I said the criteria for the EmployeeID was to be [Forms]!
[frmEmployees]![EmployeeID]. When I double click the query and insert
an Employee ID, it gives me the right number. So I went into the form
and created a text box. The form itself is based on tblEmployees, so
I went into Properties of the text box, and under control source, put:
[qryEmployeesTotalHours]![SumOfHoursWorked]
When I open the form, the text box has #Name? in it.
Does anyone know what the propblem is? What I am trying to do is have
it recaculate as the user scrolls through the records (different
employees) of the Employees Form. Any help would be greatly
appreciated. If I have posted this in the wrong forum, please let me
know.
Thanks,
John