vba question

yes the filtering by discipline achieves everything that I need because I need a report broken down by discipline/each work item except for in the sub report. In the sub report I need the grand total of the discipline for each sub not broken down by work item number.
 
That is why i thought it would be best to have a code that would set the criteria in the query with the combo box initially ........because when the criteria is set in the query it gives the the information that I need in the sub report and the main report.
 
Going back to when you asked this:

oh thats ok...one more quick question. How would I add the sub report to also filter in the same code...rptComparisionSheetSubReport

Based on everything you have said in your most recent posts, you would not want to filter the subreport if you want all of the details/totals.
 
yes i have to filter the sub report because if it is not filtered all the sub totals show and it only needs to show the one discipline/sub totals. the sub report does not filter when the main report filters
 
Could you please provide an updated copy of the database? Please identify the form you created to do the filtering. Could you also provide an example report of what you are after?
 
I have attached a sample db and also a sample desired report. The report that filters the discipline in the main report is frmComparisionSheetSummaries......The only way that I have been able to achieve the desired report is by entering a criteria in subdiscipline in qryComparisionSheet. Otherwise the sub report shows as is in the attached db with all subs rptComparisionSheetSubReport. Tank and Stage are the only two disciplines sampled. Password : LOCK
 

Attachments

The reason you could not link the main and subreports via fkDisciplineID is because you had the subreport in the footer of the main report. It has to be in the detail section. I moved it and did the linking, but whether it gives you what you want, I'll leave that to you.

BTW, I got several errors for missing references.
 

Attachments

I cant get the file to open ......it says the file may be corrupt. Also I am aware of the missing references because I deleted some other things so that I could shrink the db to post on this forum so its ok. thank u
 
I did not have any trouble downloading and opening the file. Here it is again but unzipped.
 

Attachments

I have attached the error message. I still could not open:confused:
 
Sorry, I missed that. I do not have an explanation for the error message. Did you try to put the file in your my documents folder? Is that folder set up as a trusted location for Access?
 
i could never open the file but i solved the problem by adding a parameter to the query. thank u for all ur help
 

Users who are viewing this thread

Back
Top Bottom