Repeating Details (2 Viewers)

Emma35

Registered User.
Local time
Today, 13:49
Joined
Sep 18, 2012
Messages
488
Hi All......i'm back a bit sooner than i thought

I'm updating a database which records the dispensing of safety equipment to employees. I have a main form which records the person's name, ID number etc and then a subform where you use combo boxes to list the equipment given to that person. My problem is that when i try to run a report listing what a person was given, i'm getting the list repeated in the details section of the report for some reason. I've tried 'Select Distinct' in the query but no luck. Anyone any idea how to correct this ?

Thank you
 
Hide the details section?

If you want proper help provide the relevant detail such as form design, relevant code etc otherwise we are just guessing
 
Emma,
Please provide some code and/or details of your tables etc. People can't guess your issue and solution without some context.
 
Sorry guys i sometimes forget you're actually human :)

I've attached a smaller version of the database. To add records you use the frmClothingIssue. To search use frmSearchOptions1 and the report in question is rptSearchResults.

Thanks for the help all
 

Attachments

think you have other issues but don't have time to go through them at the moment.

your cboEmpName should be unbound, don't use the change event, use the after update event with

me.filter="EmployeeID=" cboEmpName
me.filteron =true

if this form is supposed to be editable (at least as far as the main form is concerned), include another textbox for employee name - you will probably also need an 'add new' option somewhere
 
I'd suggest taking a step back.
You are running both reports off of the same query. You CAN do it this way, but normally your subreport uses a different datasource.
In your case, I'd recommend just using your query (if it gives the right answers) but make one report that has the PPE in the detail. Group by the Employee and put all of your employee data in the group header.

This should be pretty quick to build using the wizard to see how your data gets broken out, then you can arrange as you need.

Where you will most often run into subreports is if you are showing both PPE records (what they have) and a second report for each employee showing assignments / qualifications / what not to explain WHY they need this PPE.
 
The problem is that the main report's Recordsource query joins to the child table. If you open the query, you will see the problem. Every main report will print once for each associated child record.

Solution is simple. remove the child table from the RecordSource of the report.

And fix the other issues already reported.
 

Users who are viewing this thread

Back
Top Bottom