Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / April 2008

Tip: Looking for answers? Try searching our database.

How can i select data to put into a report?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
georgia_3010 - 24 Apr 2008 16:06 GMT
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?
akphidelt - 24 Apr 2008 17:51 GMT
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

> 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?
Evi - 24 Apr 2008 23:49 GMT
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

> 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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.