Employee's Form Problem


M

Melissa

Hi there

I have created a cmdbutton which opens a form "frmEmployeePayrollSearch".
This form is based on a query (qryEmployees).

The fields for queryEmployees are:

EmployeeId from tblEmployees
FirstName from tblEmployees
LastName from tblEmployees
Date from tblShifts - Criteria for
date: Between [Forms]![frmPaysheets]![StartDate] And
[Forms]![frmPaySheets]![EndDate]

So When i click the cmdbutton, the frmEmployeePayrollSearch opens displaying
the results for queryEmployee, (after I enter the start and end date). This
works fine, the form brings up all the employees who have worked shifts
between those two specified dates. - I can then select "printPayslip", which
prints the rptPayslip for the certain employee.

However, due to the fact that all employees work more than one shift in a
month, most of the employee records are showing up a few times on the
"frmEmployeePayrollSearch". I only need it to show each employee who had
shifts between the specified dates. Not each employees name showing for
each shift they worked?

Any assistance would be greatly appreciated

Thank you

Melissa
 
Ad

Advertisements

T

Tom van Stiphout

On Fri, 20 Feb 2009 14:43:08 +0200, "Melissa" <[email protected]>
wrote:

Edit your query and make Date an invisible column by unchecking the
checkbox. Then right-click in the background of the query design
window > Properties > Unique Values and set it to True.

BTW, "Date" is a really bad name for a field, because it also is a
reserved word. At a minimum you will need to wrap it in square
brackets. MUCH better to rename it, perhaps to DateWorked or
ShiftDate.

-Tom.
Microsoft Access MVP
 

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