Using form or query to generate report

k.halterman

New member
Local time
Today, 12:52
Joined
Apr 11, 2013
Messages
3
Using a table with employees, I created another with equipment that uses a lookup to assign each piece of equipment to an employee (more than 1 piece of equipment can be assigned to each employee)

What I want to do.

I want to be able to select records using a form, either by checkbox or listbox of which employees to include in the report that shows what equipment each is assigned. The problem I am having is creating the form/code to create the and/or query to generate the report.

Any help?
 
If you have 3 tables, you can create a query as the base of your report.


tblEmployee
EmpId PK
EmpFName
EmpLName
..other Emp info

tblEquipment
EquipID PK
EquipName
EquipDesc
..other Equip info

tblEmpHasEquip
EmpHasEquipID PK
EmpId
EquipId
Use these 2 fields make a compound unique index to prevent duplicates
...other fields specific to this Employee and this piece of Equip

You may have other fields such as below, and you may have to include some of them in the compound unique index (depends on your table and intentions)
LoanedDate
ReturnedDate
Comments

Then make a query based on these 3 tables.

Use the query as the RecordSource of the Report.
The Report has Sorting and Grouping parameters.

Good luck.


Edit after Posting: I see Paul's response. I didn't pick up on the significance of your Form to build the query. His example/reference is great.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom