|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Query entry in report
This may be simple but I can't figure it out
I use a simple query called week number in which you enter the week number. This is via the queries criteria box like [enter week number] If I enter say 41 here to show week 41, how do I get this number entered onto the report itself ? like a heading called "Week 41" Can I take the value netered into the query and display it on the report ? Thanks for any help |
|
#2
|
|||
|
|||
|
Ar first I though I know exactly what you should do, and as I start creating the query to pull a single week for data, I thinking to myself, you already the the data you need to enter in the report header which week's of data you are pulling in.
TO you question Can I take the value netered into the query and display it on the report ? YES Whe you enter the criteria of 41 the same column will only list 41 so just pull from that field and put it into your report header. But if you every want to do a week range (41-45) here is sql code for that SELECT Table1.CurrDate, Format([CurrDate],"ww") AS Week, [Enter the Beg Week] AS BegWeek, [ Enter End Week] AS EndWeek FROM Table1 WHERE (((Format([CurrDate],"ww")) Between [Enter the Beg Week] And [ Enter End Week])); s- |
|
#3
|
|||
|
|||
|
query entry in report
Not sure if this will help you, but here goes...
Assuming your query asks for parameter entry to run the report for, if you simply want to print the parameter(s) entered, try this: In design view of course, in the Page Header (Not the report header, unless you only want headers on the 1st page), insert a Text box where you want it. In the Control Source property for the text box, enter the same exact parameter that you have in your query, for example [Enter Beginning Date:] The label for the text box can say something like "Report Run Date" or whatever your parameter is asking for. Another way you can do this is if you are passing parameters to a report from an entry Form (using an unbound field name) instead of a parameter query: Again, in the report's page header (or footer), insert a text box. For the Control Source, enter the expression =Forms!FormName!FormFieldNameUsed the "=Forms!" part is necessary, then you replace the FormName with the form you are passing the params from, and the FormFieldNameUsed is the unbound field name the parameter is from. Hope this helps, and if anyone sees that this is wrong, please reply! I may not have the greatest explanation skills just yet. |
|
#4
|
|||
|
|||
|
Thanks all, with your help I have solved it.
(or rather you solved it ![]() |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Query entry in report |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|