stopher2475
asked on
Filter access report with text box
I have a report with RecordSource:
My goal is for the query to be filtered based on the text box:
[Forms]![frmMain]![txt_Dis trictFilte r]
This is not working. The result is an empty set.
Can someone help me with what I'm doing wrong?
SELECT qryPvt_SkillGroups_Descrips_District.*, qryPvt_SkillGroups_Descrips_District.Dist_PID, *
FROM qryPvt_SkillGroups_Descrips_District
WHERE (((qryPvt_SkillGroups_Descrips_District.Dist_PID)=[forms]![frmMain]![txt_DistrictFilter]));
My goal is for the query to be filtered based on the text box:
[Forms]![frmMain]![txt_Dis
This is not working. The result is an empty set.
Can someone help me with what I'm doing wrong?
try taking the brackets off of the form. instead of [forms] try forms!frmMain!txt_Distirct Filter
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<No Points wanted>
I'm with fyed...
The advantage there is also that you can still open the report on its own, and not get an annoying parameter prompt...
I'm with fyed...
The advantage there is also that you can still open the report on its own, and not get an annoying parameter prompt...
...Also make sure that the textbox has a value in it.
Also make sure that the textbox value has been "Updated" (the focus has moved off the control.) before you open the report.
(If you simply type in a value in the textbox, then immediately open the report, the textbox value may not be available...)
Also make sure that the textbox value has been "Updated" (the focus has moved off the control.) before you open the report.
(If you simply type in a value in the textbox, then immediately open the report, the textbox value may not be available...)
ASKER
I would have moved it to a open report method but I have to save these down as pdf's and then merge them. Played around with it and it seems to be working now.
Not sure what you mean by:
"I would have moved it to a open report method but I have to save these down as pdf's and then merge them."
Were you typing in multiple IDs into the textbox? If so, you didn't indicate that. Are you performing some kind of loop? I'm not satisfied that the answer we gave actually addresses your problem if either of these is the case.
Although you can always merge PDFs, it is far easier to create a single report with multiple pages than it is to merge pdfs after the fact. Provide a little more explanation and maybe we can help you craft a "better" solution to your problem.
Dale
"I would have moved it to a open report method but I have to save these down as pdf's and then merge them."
Were you typing in multiple IDs into the textbox? If so, you didn't indicate that. Are you performing some kind of loop? I'm not satisfied that the answer we gave actually addresses your problem if either of these is the case.
Although you can always merge PDFs, it is far easier to create a single report with multiple pages than it is to merge pdfs after the fact. Provide a little more explanation and maybe we can help you craft a "better" solution to your problem.
Dale
ASKER
I have to use multiple reports as there are different section. I have a cover letter. customer highlights. etc. Is there another way to combine multiple reports into one output? I know it doesn't matter when printing. I can just print in order but they're going to want a file to email.
I do agree that the correct way would be to do a grouping but as these are going to different customers I'm outputting to different files.
I do agree that the correct way would be to do a grouping but as these are going to different customers I'm outputting to different files.
stohper,
You can put multiple subreports into a single report, and separate them by either page breaks, or by putting them in separate sections of the report.
If you do this, then the main report would primarily contain a group header that contains the basic information you want to display. Then, in the details section you could either type in a textbox with all the "cover letter" information , or create a separate subreport for that.
Then, below the CoverLetter subform, you would insert a page break control and then insert your next subform, and so on and so on.
You can put multiple subreports into a single report, and separate them by either page breaks, or by putting them in separate sections of the report.
If you do this, then the main report would primarily contain a group header that contains the basic information you want to display. Then, in the details section you could either type in a textbox with all the "cover letter" information , or create a separate subreport for that.
Then, below the CoverLetter subform, you would insert a page break control and then insert your next subform, and so on and so on.