Filtering Report (with Subreports) Using Multiple Parameters
Sep 17, 2006
hey there
i have a main PatientForm that contains patient information from multiple tables:
[GENERAL] values
Subform - [RefMD] values (referring doctor)
Subform - [Drugs] values (prescribed meds)
Subform - [Diagnosis] values (medical diagnosis)
Subform - [Encounters] values (visits to the doctor)
what i have is a form (image attached) and i need to be able to select any combination of parameters (including state, zipcode from GENERAL, i.e. referring doctor last name from RefMD, Drugname from Drugs, Diagnosisname from Diagnosis, and VisitType from Encounters) and filter PatientForm where all the selected parameters are true..
does that make sense?
all tables are linked using the field HistNum
how do i code this? i am pretty lost right now
View Replies
ADVERTISEMENT
Aug 8, 2014
I have a database (Access 2007) that handles a large number of consultants. Each consultant has a number of skills, has worked in a number of countries, and speak several languages. As contracts come in, I wish to generate a report based on the skill set, language and country/countries that best suits the contract; thereby identifying a group of most suitable consultants. I have designed a report with three sub reports for skills, languages and countries. Each sub report is linked to the main report through Link Master/Child fields using the ConsultantID. That's all fine; I get a report showing all consultants listing all their qualities.
Now, I want to be able to filter the sub reports on the three aspects: Skills; Countries; and Languages.
In the past, for other applications, and with the unfiltered form in preview I have used a popup form with unbound Combo Boxes to generate a string to use in the reports filter. I think I got that technique from Allen Browne, and it has really served me well.
Now, however, I can't use this technique since I can't set the filter for the sub reports. I thought that I might be able to use the Link Master Field with text boxes on the main report, but haven't managed to figure that out.
View 14 Replies
View Related
Oct 19, 2004
I have a report with several subreports that occassionally grow. I also have several fields that don't grow. If my subreport grows, it moves any other fields down as well. These are fields that are below the subreport, but not beneath it (e.g. on a lower line, but to the left).
Is there any way to keep the other fields stationary?
Thanks!
View 2 Replies
View Related
Feb 12, 2015
I am relatively new to Access. I am having difficulty summing up totals and bringing them into the main report. To be more specific I have two sup reports called WOExpenseTotalSubreport and WOServiceTotalsubreport. These two subreports are based off of queries that gather the description, price and qty of either services or expenses and then produces a "total" for me on the query.
When I bring these two queries into a report as sub reports I am able to Sum the "total" field in the subreport footer which works fine. What I would like to do is add those two totals together for a grand total on the main report. The two summed fields are called ExpensesSum and ServicesSum. It seems most things I have tried do not produce an expression error but the result is either #error or #name? Here are a few different scenarios I have tried both on the main report details section as well as the footer section.
=[Reports]![qryWOExpenseTotal subreport]![ExpensesSum]+[Reports]![qryWOServiceTotal subreport]![ServicesSum]
=Sum([qryWOExpenseTotal]![Total]) + Sum([qryWOServiceTotal]![Total])
=[qryWOExpenseTotal subreport].[Report].[ExpensesSum] + [ qryWOServiceTotal subreport].[Report].[ServicesSum]
View 3 Replies
View Related
Jul 8, 2013
I am working on a report that will have 16 sub-reports, one right below the other. Because of the complex nature of the calculations in the groupings it seemed easier to "build" the report using vba rather than using the report's built-in grouping ability. The issue I am running into is that there seems to be no simple way to control the height of the sub-reports. I had hoped that setting "can grow" to yes would change the height of the sub reports and move all subsequent sub reports down (Allas)
As an alternative I thought too that I might be able to set the height of the sub-report control, which would make for a tricky but not impossible bit of programming, but (Again allas) I can't seem to find a reasonable way to determine the required height of the sub-report's control.
View 3 Replies
View Related
Oct 21, 2004
I'm pretty new to Access, so if I'm doing this the hard way, that's why.
I work in a quality control position, and I'm trying to set up a single Access database for the QC staff to use instead of everyone having their own seperate Excel workbooks.
The issue I'm running into at the moment is on a report. Each record is graded on four seperate types of criteria, Error Type 1, Error Type 2, Error Type 3 and Error Type 4, all of which need to be reported on seperately. So I have at least four queries set up, all with the same parameters (right now, just review date.) I'm trying to pull through all four queries on the same report, and so far I've had success having the report ask for the parameters only once and then applying it to all four queries. However, I'm running into a problem where Access is now forcing the filters of each individual query on to each of the other three queries, so it's only pulling through records for all four queries that match the criteria of all four. Any record which only matches the criteria of one, two or three of the queries is being left off the report.
Sorry if this sounds confusing. Anyone have an idea as to what I'm doing wrong?
View 3 Replies
View Related
Feb 11, 2015
In our Student Administration database, we have a Student Evaluation Report which prints a 1 page per student report in memo like format. The instructor had previously input rating numbers (4=Best, 1=Worst) for 9 categories for each student via a database form into the Evaluations Table.
Two other elements of the rating are an Attendance based on number of days absent and a Grade Point Average (GPA) calculated from the student's test scores. The instructor then prints and reviews the report with each student.
There is an Evaluations Parameter table which has the following fields:
Field
Description
ID
The autonum key field.
Class
eg., 2015-1
Evaluation Number
A single digit (eg., 1, 2). There may be more than 1 evaluation for each class.
EffectiveDate
The "as of" date of the evaluation.
There are then several other tables that are input to a query that will be the record source for the report:
Table
Purpose/Data
Students
Student Name, Class
Absence
Has a record for each student's absence with date and a 1 or .5 indicating a whole or half day absent.
Test Grades
Has a record with each student's test results with date and score.
Evaluations
Holds the rating score for each of the 9 rating categories.
The Student Evaluation report is launched from an unbound Reports menu form via a button. On the Reports menu form I wish to have controls for the user to select which evaluation to report on. The Absence and Test Grade information needs to include records that are <= the EffectiveDate in the Evaluation Parameter table. The Evaluations records need to match the Class and Evaluation Number in the Evaluations Parameter table.
I would like the user to be able to select the Evaluation Parameter via a combo box vs. specifying the Class, Evaluation Number and Effective Date separately and then have the query record source for the report use those two fields as criteria. But my limited understanding of the Combo box indicates that only 1 field from the lookup query of the Evaluations Parameter table can be stored in the control whereas I need 3 (Class Evaluation Number and EffectiveDate).
How the user can select the desired Evaluation Parameter record on the Reports menu form and use the 3 fields from the selected record as criteria in the report's record source query.
View 10 Replies
View Related
Feb 28, 2012
I am creating a booking database for a Bus Hire company. There is also an Invoice element to it, which will Invoice customers for a range of bookings that they've made.You will see in the screen image, the relationships between the four tables:
-tblInvoice
-tblInvoiceDetails
-tblCustomer
-tblBooking
IN tblBooking (see screen dump) the customer is allocated a booking number and so on. However, at the end of the month, the Customer will be invoiced for specific bookings. I would like to, firstly, select the customer in the Invoice form, then in the InvoiceDetails subform, select THE BOOKINGS THEY HAVE PREIVOUSLY Made using a look up. (see screen dump called frmInvoice.Gif)
I have applied a criteria to the data source for the look up. (see image datasource...GIF) with forms![frmInvoice]![CustomerID] in the hope that the query will search for BookingIDs where the currently selected CustomerID (in Form Invoice) finds a corresponding match in tblBooking.
View 14 Replies
View Related
Mar 31, 2013
I need to create a report based on how a user creates construction components of which there can be any number, e.g.
Component 1
Component 2
Component 3
...
Component n
Each component has different data.
A report is needed to show the above components. The issue I am having is this - the user can select components to be repeated as follows:
Component 1
Component 2
Component 3
Component 2
Component 3
Component 2
I have created subreports for the components but when I run the report (no master/child relationships defined for any of the subreports) I get:
Component 1
Component 2
Component 2
Component 2
Component 3
Component 3
So I created a master report (in design time) and added subreports using VBA and now I get the components in the correct sequence, but how do I get the data to show up correctly because at run time the same query runs for each subreport component and I end up with the above sequence.
Defining the subreport query at design time won't work because then the subreport for a particular component will show the same data.
I need each subreport to recognize which data to show at run time - but I am not sure how to accomplish this.
I'm trying to stay away from duplicating subreports in the case where the same components are selected.
View 1 Replies
View Related
Dec 23, 2013
I've narrowed my problem to a subreport that prints multiple copies of the report based on the number of items generated in the subreport.
i.e. If I have an instructor registered to teach three classes in the subreport, the main report will print three time (identical). An instructor with two classes will print twice (identical).
No button...just good old "print" how? why? where?
View 3 Replies
View Related
Nov 26, 2013
I am trying to open a report (with subreports) from a form. When the report opens, I want the form to hide, which most of the time does. Sometimes, though, it won't hide when the report opens. So, I even created an error handler, and moved that part of the code to SubExit section, but the problem still occasionally occurs. Here is my code:
Code:
Dim strWhere As String
Dim strDate As String
Dim strDist As String
On Error GoTo ErrHandler
strDate = "=DateSerial(" & Year(Me.txtAsOfDate) & "," & Month(Me.txtAsOfDate) & "," & Day(Me.txtAsOfDate) & ")"
strWhere = "YearEnd = " & Year(Me.txtAsOfDate) - 1
[Code]...
View 2 Replies
View Related
Apr 15, 2015
In my database, I have a report called "rptEventsbyEmployee" and in that a subreport called "sbrptEventsbyEmployee". The master/child link is the employee name. Everything is fine until you get to page 3 where the subreport shows twice.
View 5 Replies
View Related
Jan 15, 2015
I have three reports that I have used as the subreports for one master report. The master report shows the three subreports on a page.
When one or more of the subreports contains no data the master report still shows the empty subreport. I would like subreports with no data to be left off the master report if this is possible.
For each of the individual subreports I have used the On No Data event to display a message and then not open the report if there is no data. This works fine for the individual subreports but when I open the master report the "empty" subreport is still displayed.
Is there a way to leave the subreport off the master report when there is no data in the subreport?
View 1 Replies
View Related
Dec 30, 2004
I have a main report with 2 subreports. My main report has a header section, the 2 subreports are in the detail section of my main report. How can i prevent my report from splitting up my header and my subreports. (Header section of my main report is a company and the subreports are the detail of the company.. i don't want my compnay name on the bottom of a page and then the detail on the next page.. it does this sometimes. thanks!
View 5 Replies
View Related
Aug 9, 2013
So I run cash flow for a business, and we export data from Oracle and insert it into an access database. I have to run about 25 queries, entering in the same parameters for each. We number each week of the year. So for say the first week in January, I would run the first query and it asks: Beginning Week, I enter in 1, then another paramter value asks me the ending week. I have to enter in these parameters for each of the 25 or so queries, and it becomes quite irritating. Each query has a number of columns, but I am only interested in obtaining the sum of one of the columns, titled Distribution amount. So I am looking for something that will run each of my specified queries, then spit out the total of the distribution column for each in a table like.
Query 1: Total Distribution
Query 2: Total Distribution
etc....
Is there anything that would allow me to do this, with entering in the week parameter once, say week 1 start, week 1 end. and it use those same parameters for each query?
View 1 Replies
View Related
Jun 27, 2006
I created the below query to come up with a new form. When I enter a single parameter, it works fine. When I modify the code and enter multiple patameters, it also works fine if I do not enter any information for the parameters. But once I enter one of the parameters information, then it does not come up with anything. I double checked and made sure it was typed in correctly. Is there a trick when entering multiple parameters on a query?
SELECT [JE 06 Log].[Operational Region Name], [JE 06 Log].[Period Name], [JE 06 Log].[Source System], [JE 06 Log].[Source Name], [JE 06 Log].[Category Name], [JE 06 Log].[Associated Category Name], [JE 06 Log].[JE Name], [JE 06 Log].[JE Base #], [JE 06 Log].Area, [JE 06 Log].[Line Description], [JE 06 Log].[Natural Account], [JE 06 Log].Description, [JE 06 Log].[JE Entry Date], [JE 06 Log].[Debit Amount], [JE 06 Log].[Credit Amount], [JE 06 Log].Amount
FROM [JE 06 Log]
WHERE ((([JE 06 Log].[Period Name])=[Enter Period]) AND (([JE 06 Log].[Source Name])=[Enter Path]) AND (([JE 06 Log].[JE Base #])=[Enter Base Number]) AND (([JE 06 Log].[Natural Account])=[Enter Natural Accnt])) OR ((([Enter Period]) Is Null) AND (([Enter Path]) Is Null) AND (([Enter Base Number]) Is Null) AND (([Enter Natural Accnt]) Is Null));
View 6 Replies
View Related
Nov 16, 2014
The aim of what I am doing is to create a monthly statement to give to our intermediaries that shows the commission they will receive each month for the deals they have referred. I have managed to create this report, HOWEVER I can't figure out how to filter out which month I need, so I a report for Jan, Feb Mar etc... The idea is that at the end of each month I need to run the report so only the latest month shows...
View 3 Replies
View Related
Jul 26, 2005
I am trying to strengthen an already developed database at my work. They had a form with five different text boxes, each one that would run a seperate query on the same table, and the results would open on a different page. I am trying to combine all these text search parameters from the form to a single query and have the result come up on the form. I have done every search I can thing of from a forum search, a google search, and just reading through query forum posts for about a day; but I still cannot tell what is wrong. If someone could look at my code, and see if I have a mistake, or if I'm even in the right direction. :confused:
SELECT FLIGHTS.[FINISH OD], FLIGHTS.[PIPE OD/SHAFT OD], FLIGHTS.PITCH, FLIGHTS.[TYPE OF MATERIAL], FLIGHTS.[BURNED OD], FLIGHTS.[BURNED ID], FLIGHTS.[RIGHT/LEFT HAND], FLIGHTS.PartNumber, FLIGHTS.COMMENTS, FLIGHTS.[START TIME], FLIGHTS.[FINISH TIME], FLIGHTS.PurchaseOrderNumber, FLIGHTS.QTY
FROM FLIGHTS
WHERE ((FLIGHTS.[FINISH OD]=Forms![KNOWN BURN SIZES]!Text25 & "*") And (FLIGHTS.PITCH=Forms![KNOWN BURN SIZES]!text37 & "*") And (FLIGHTS.[TYPE OF MATERIAL]=Forms![KNOWN BURN SIZES]!Text32 & "*") And (FLIGHTS.PartNumber=Forms![KNOWN BURN SIZES]!Text0 & "*") And (FLIGHTS.PurchaseOrderNumber=Forms![KNOWN BURN SIZES]!text36 & "*"));
The FLIGHTS is the main table, [KNOWN BURN TABLES] is the form that the parameters are entered. I want users to be able to enter any fields they want and leave others blank. Currently all I get is a blank query. Sorry if the answer seems obvious; I tried avoiding posting till I knew that I couldn't figure it out on my own.
Thanks.
-Brian
View 8 Replies
View Related
Mar 30, 2005
I often use forms to select a parameter & date range for a subsequent report. Where I have chosen to use multiple combo boxes (two in this case)to select more than one parameter I have run into a problem. The report opens ok the first time but if I close it (report) and change my selection then the report refuses to open. Should I just requery the two combo boxes, is there something else or can't it be fixed?
View 1 Replies
View Related
Oct 26, 2004
I've created a database where I have all the information for people like name, address, etc. Then there's a list box to choose what events they will be attending. I want to be able to run a report and see all the information for the people who are attending any specific event. Is there a way to create a form where I can click a button then it brings up the screen to choose the parameters of my report, then generates the report? Thanks!
View 4 Replies
View Related
Apr 20, 2007
I am trying to figure what code to use. What i am trying to accomplish is when the use clicks to open a report i want a form to open and make them choose from a combo box a "training activity". then the report will generate info for that activity only.
Any thoughts??
Thanks
Megan
View 7 Replies
View Related
Jan 4, 2006
I have this code of a command button, which would allow me to generate the result of the SQL. I think the code is wrong... Can someone help? I guess something wrong with the bracket...
strSQL = " SELECT NewsClips.RecordNumber, NewsClips.IssueDate, NewsClips.Title_Eng, NewsClips.Titile_Chi, NewsClips.NewsSource, NewsClips.[1CategoryMain], NewsClips.[1Sub-Category], NewsClips.[2CategoryMain], NewsClips.[2Sub-Category], NewsClips.hyperlink, NewsClips.FirstTwoPara, NewsClips.Notes, NewsClips.attachment FROM NewsClips " & _
"WHERE (NewsClips.[NewsSource] " & strNewsSource & _
strNewsSourceCondition & "NewsClips.[1CategoryMain] " & str1MainCate & ")" _
str2MainCateCondition & "(" "NewsClips.[NewsSource]" & strNewsSource & _
strNewsSourceCOndition & "NewsClips.[2CategoryMain] " & str2MainCate & ")" ";"
Indeed, I try to modify the SQL that works in a test query (as I want to know what went wrong with my code): the changes would be replace OR to a toggle option.
SELECT NewsClips.IssueDate, NewsClips.Title_Eng, NewsClips.Titile_Chi, NewsClips.NewsSource, NewsClips.[1CategoryMain], NewsClips.[1Sub-Category], NewsClips.[2CategoryMain], NewsClips.[2Sub-Category], NewsClips.hyperlink, NewsClips.FirstTwoPara, NewsClips.Notes, NewsClips.attachment
FROM NewsClips
WHERE (((NewsClips.NewsSource)=[Which News Source]) OR ((NewsClips.[1CategoryMain])=[Which Category?])) OR (((NewsClips.NewsSource)=[Which News Source]) OR ((NewsClips.[2CategoryMain])=[Which Category?]))
ORDER BY NewsClips.IssueDate DESC;
Your help will be greatly appericated.
View 3 Replies
View Related
Apr 22, 2008
I'm trying to setup a parameter that has a multiple choice so to speak. Rather then the user being able to enter whatever data they want.. I would like them to have a choice between two items.
Is it possible? if so.. how do I do it?
Thanks!
View 14 Replies
View Related
Aug 25, 2004
I have a field in a table called reasons. Then I have a list of possible reasons in a drop down list for my form. I want to create a report that allows the user to select from a drop down of these reasons and do a query for only those records with that specific reason. I know you can ask that info be typed in by using brackets in the query but instead of typing the reason I want to be able to select from the drop down list to produce the report. Can this be done?
View 1 Replies
View Related
Oct 31, 2005
I am trying to run the below union query, but it keeps asking for FRGHT_BL!FB_CREAT_DTM as a parameter. I want it to only ask for the Start Date and End Date once.
SELECT * FROM qLOC_ID WHERE(((FRGHT_BL!FB_CREAT_DTM) Between [Enter Start Date] And [Enter End Date])) UNION SELECT * FROM qLOC_ID2 WHERE(((FRGHT_BL!FB_CREAT_DTM) Between [Enter Start Date] And [Enter End Date])) UNION Select * From qLOC_ID3 WHERE(((FRGHT_BL!FB_CREAT_DTM) Between [Enter Start Date] And [Enter End Date]));
View 1 Replies
View Related
Jan 11, 2005
I created a report using wizard and altered the parameters to what I need on my report and saved it as a new autoformat. The autoformat did not retain the parameter adjustments I made...only the basic format...no size changes...grouping I added ...a seperator line between the groups and the bound items I deleted that I did not want were still there. All I want to do is to be able to use the report format I created numerous times as it is without me having to go in and make adjustments with each query I pull a report from. There are several different query's with different tables involved. To sum it up one report format to use multiple times....Help Please!
View 5 Replies
View Related