A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How can i select data to put into a report?



 
 
Thread Tools Display Modes
  #1  
Old April 24th, 2008, 04:06 PM posted to microsoft.public.access.reports
georgia_3010
external usenet poster
 
Posts: 1
Default 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  
Old April 24th, 2008, 05:51 PM posted to microsoft.public.access.reports
AKphidelt
external usenet poster
 
Posts: 591
Default 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  
Old April 24th, 2008, 11:49 PM posted to microsoft.public.access.reports
Evi
external usenet poster
 
Posts: 898
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:15 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.