If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How can i select data to put into a report?
i am making a report every week from the same database but dont want the data
i put into a report last week into the report for this week. I there anyway i can select the data i want to put in? |
#2
|
|||
|
|||
How can i select data to put into a report?
There is multiple ways of doing this... you can use the DoCmd.OpenReport
Where statement... you can create a query linked to a table that has criteria linked to a control on a form. So on the form you would have a date range... like datestart and dateend. In the query criteria you would put between Forms!yourform!datestart And Forms!yourform!dateend "georgia_3010" wrote: i am making a report every week from the same database but dont want the data i put into a report last week into the report for this week. I there anyway i can select the data i want to put in? |
#3
|
|||
|
|||
How can i select data to put into a report?
We'll call your date field WkDate
Create a query based on the same table as your report uses. In Design View of the query, in the Criteria row, under your date field type Between Date() And (Date()-7) Name your query QryLastWeeksData Open your report in Design View Click on Properties, On the Data tab, next to Record Source, click the DownArrow and choose QryLastWeeksData. This will show the data for the last 7 days If you want to show data for the current week even if the week hasn't finished yet, in a new column in your query, in design view, type WeekSt: DateValue(Int(NZ([WkDate])))+1-DatePart("w",DateValue(Int(NZ([WkDate]))),2) This gives you the date of the first Monday of the week in which the date falls In the criterial row under this put DateValue(Int(NZ(Date())))+1-DatePart("w",DateValue(Int(NZ(Date()))),2) Evi "georgia_3010" wrote in message ... i am making a report every week from the same database but dont want the data i put into a report last week into the report for this week. I there anyway i can select the data i want to put in? |
Thread Tools | |
Display Modes | |
|
|