Running A Report By Selecting Dates

Jun 23, 2005

Dear All:

I have created a database to keep track of transcripts that are requested. This database has their names, ID number, date requested(With a pop-up calender), transcript type requested(This is a combobox where the choices are "Official Copy" and "Student Copy") and address.

So far, it works great. What I wish to do is run a report that I can choose the begining date and ending date for a specified month to see the total "Official Copies" and "Student Copies" for a given month.

Any ideas out there?

Hats off to Colm!

Regards,

Dion

View Replies


ADVERTISEMENT

Queries :: Running A Query From Selecting Field Name

Jun 3, 2015

I have a table of prices for commodity contracts, with my first field showing the dates the prices are from and the subsequent fields relating to the individual contracts (contract A, contract B, contract C, etc.)

I want to run a query that allows a date range to be selected, and a contract to be selected.

the first part I am pretty sure i know how to do (Between [Enter Period Start:] And [Enter Period End:]), but its selecting which contract i want this range to apply to that I am not sure how to do.

Can this be done in the same query? or would i have to do something like create a separate query for each contract and then use a form with a selection box that chooses which query to run?

View 7 Replies View Related

Selecting Dates

Jun 29, 2006

Quick one for you geniuses out there!

I would like a command button to print records from a select query displaying dates for the past 2 days but not for todays date.
e.g. today is the 29th, I want to print records for the 27th & 28th.

Data is being recorded hourly and kept for 2 months so there will be new and old data that I don't want printed.

Thanks for the help!!

View 1 Replies View Related

Selecting Only Some Dates From A Calendar

Dec 28, 2005

I am totally new to Access and this is my first database.

I have a database for volunteers in which one table is basically a calendar. In this table I have fields for the month, day of the week (i.e Monday) and day of the month (i.e 21st). There is also a filed called "Special days"

Sometimes I may want to produce a report that selects only certain days such as Saturday, Sunday and other days marked as "special days". Another time I may also want to produce a report that selects other days.

At the moment I have a "test filed" in which I place a 1 for those days i want to select then I choose all those with a 1. This is obviously a very poor construction.

Can anyone offer me a more advanced method?

View 1 Replies View Related

Selecting Data Between Two Dates

Mar 5, 2008

I have a database which records time spent on various projects and I would like to be able to calculate the time spent on any particular project between two selected dates. The report and the query behind it already works to display the time accrued on all the dates of a project, but I want to be able to break it down to small ranges of dates

I have a form on which the user selects the start date and the end date. How can I apply this calculated information as a criteria in a query so that I can produce a report with the relevant information on it.

I already have the report and the date selection form designed. The dates selected go into two unbound fields which have a date format.

I hope someone can help me.

Rob

View 6 Replies View Related

Queries :: Selecting Dates From A List

Dec 11, 2013

I have a table containing a list of dates in "MMM YYYY" text format from "Jan 2010" to "Dec 2020".

I would like to restrict the list from the first record (Jan 2010) to the current month using today's date (eg in this case Dec 2013).

I know about

Code:
Format(Date(),"mmm yyyy")

And have tried the criteria

Code:
<Format(Date(),"mmm yyyy")

But doesn't work and haven't got much further....

View 6 Replies View Related

Queries :: Selecting All Date Fields Between Two Dates?

Jul 31, 2013

I'm trying to select a range of relevant dates for an amortization calculation (see my earlier thread on this subject here), but I'm having a bit of trouble making the SQL work.

I have a table called "t_AllMonths" that has only one field: MonthStartDate which contains the first day of the month for a very wide range of months over something like a ten-year period. I'm calculating amort for assets which will be amortized for some subset of those months (defined by the asset's Amort Start Date and Amort End Date). Further complicating matters, the amortization may be suspended during certain "hiatus" periods when the asset it not planned to be in use, and may differ by which business units make use of the asset.

So, I have three tables.

Table: t_Assets
Fields: AssetID (autonumber; primary key), Asset_Name, Asset_Cost

Table: t_AllMonths
Fields: MonthStartDate

Table: t_AmortPeriods
Fields: AmortPeriodID, AssetID, Amt_Period_Num (which I don't expect to use in this), StartDate and EndDate

Right now, I'm just trying to pull the range of dates between the earliest amort start date and the latest amort end date. (Min of StartDate and Max of EndDate, respectively) for a given AssetID.

My sql looks like this:

SELECT t_AllMonths.MonthStartDate,
Min(t_AmortPeriods.StartDate) AS MinOfStartDate, Max(t_AmortPeriods.EndDate) AS MaxOfEndDate,
t_Assets.AssetID
FROM t_AllMonths,
t_Assets INNER JOIN t_AmortPeriods ON t_Assets.AssetID = t_AmortPeriods.AssetID
WHERE ((t_AllMonths.MonthStartDate) Between [MinOfStartDate] and [MaxOfEndDate]);

I keep getting an error message that reads "Run-Time Error 3122: You tried to execute a query that does not include the specified expression MonthStartDate as part of an aggregate function."

View 5 Replies View Related

Generating Reports From A Form After Selecting Dates And Parameters

Sep 11, 2014

The input form of the database have one common table containing data for all parameters for row source. As all data was in one table had one ID. My problem is I am trying to run reports from a form after selecting dates and parameters.

For selecting parameters I created dynamic combo box. For dynamic combo box I needed ID and description of the parameters. So I created separate tables for each parameter with ID and Description column. Which ran me into the problem that when I run report based on main input form which has different row source table and my report form has different row source tables and reports doesn't run when I base my queries on the report form.

View 2 Replies View Related

Selecting Data For Monthly Report

May 5, 2014

I am constructing a database for a friend and need to filter data from a daily log to enable a report to be generated for each months actions. I have created fields of: entry date, month and year with the view of filtering by month and year. How do I perform this task?

View 3 Replies View Related

Queries :: Selecting One Record And Place It On Report?

Jun 26, 2013

After running a query is it possible to select just one record and place it on a report or print it? If so how do i go about it?

View 3 Replies View Related

Selecting Multiples Values From Listbox To Generate Report.

Aug 5, 2004

I have searched all the forms but could'nt find any answer which would help me , I have created a listbox , it works fine till the moment i set its 'Multi select' property to SIMPLE or EXTENDED , the minute i do that i get no results in my query , could someone please help me with this , i really really need to get this workin!! I have also uploaded my database so u could try it yourself...

View 11 Replies View Related

Report Using Cascading Combo Boxes By Selecting Item

Jul 2, 2012

I have made a Cascading Combo Boxes form . This form has 3 combo boxes. Its working perfectly

I have to select items in all 3 combo boxes to get a report.

What i want is, if I do not select (leave empty) any item in the third combo box it should give me the report for all the items in the third combo box "Me.SubDesCbo"

How can I do that. I am using the following code:

Private Sub cmdOpenReportSingle_Click()
On Error GoTo Err_Handler
Const REPORTNAME = "Yarn Report"
Const MESSAGETEXT = "All Combo's Must Be Selected."
Dim strCriteria As String
' build string expression to filter report
' to selected customer and account

[Code] .....

View 1 Replies View Related

Generating Filtered Report By Selecting A Month From Combo Box

May 8, 2013

Basically what I would like to do is create a Combo Box with each month of the year available to select. When I click on a specific month, I want it to pop open a Report based on my table that is filtered by the month I selected. I have a Date column already created in my base table to be my filtering device.

I've already learned how to use query's and reports a bit. I have a Command Button on my form that launches a report based on a query that only shows data for the current year. Likewise, I created one that only shows data for things with a specific item code using a [Which Item Code?] criteria in my query. So in theory, I could do this by creating 12 different buttons, 12 different query's, and 12 different reports. That seems like overkill though and it would seem there has to be an easier way to do that simply by using a combo box to select the month you want to filter.

View 14 Replies View Related

Creating And Running A Query For Report VBA

Sep 6, 2004

I've been reading up quite intensively on using QueryDef's collection to try to pass a Parameter to a Query in order to then Open a Report. But can't seem to get it to work. I've been trying to write an SQL statement that the VB will accept in code but never got it to work. Depite copy/pasting the SQL from the Query Access creates. regardless.. I really need some help with this one. Thanks. Procedure follows. Get error that Report not found... The name is correct... I just want to pass the integer (index) from the ListBox into the Query then Open the Report... Thats all...

Private Sub previewReport_Click()
On Error GoTo Err_previewReport_Click
Dim intSelectMonth As Integer 'The Index of the Item Selected in Form List Box
Dim db As Database
Dim smReport As Report
Dim smQuery As QueryDef
Dim month As Parameter

Set db = CurrentDb
Set smQuery = QueryDef![GetReviewsMonthQuery]
smQuery.Parameters![rvMonth] = 9 'Using 9 as September just for Testing
Set smReport = Reports![Review Schedule by Month/Analyst]

DoCmd.OpenReport smReport, acPreview

Exit_previewReport_Click:
Exit Sub
Err_previewReport_Click:
MsgBox Err.Description
Resume Exit_previewReport_Click

End Sub

View 2 Replies View Related

Running Query When Opening Report

Dec 7, 2005

How do I get a query to run upon opening a report. My report has a few fields from a query that once the user inputs information the query is obviously outdated. Since it needs to be as simplistic and user friendly as possible I won't ever have them run the queries themselves so I'm trying to have them run to be updated for the report when the user goes to open the report.

View 1 Replies View Related

Entering Query Restriction Before Running Report

Dec 7, 2005

I built a database off of the access wizard and it gives me the capability to enter date parameters before running my reports, than displaying the revised report. I.E. I am prompted to enter start and finish dates, and then after entering this info and hitting a button to preview the report, the only data displayed is that that falls into that date range.

I have created a new report that wasn't built into the wizard. This report "hits" an underlying query. I have also added a button on the switch manager to preview the report. I want a user to be able to click that preview report item on the switch manager, then be prompted to enter start and finish date information, then hit an ok button, then have the report with the relevant information displayed.

Any and all help would be greatly appreciated. Thanks.

View 5 Replies View Related

Modules & VBA :: Remove Prompt While Running Report

Apr 9, 2015

I posted this within the Reports as well, but since this has a little bit of VBA decided to ask this here as well.

I have a report that is created from the following query (qryTotalProjectHours). What I am trying to do is get the total hours spent on Tasks within a given time period. A given Task can we worked on by multiple individuals and hence I need to find a way to aggregate the hours spent.

Code:
SELECT TasksEntries.Project, TasksEntries.Task, Sum(TimeTracker.WorkHours) AS TotalHours
FROM TasksEntries INNER JOIN TimeTracker
ON (TasksEntries.EmployeeId = TimeTracker.EmployeeId) AND (TasksEntries.TaskID = TimeTracker.TaskId)
GROUP BY TasksEntries.Project, TasksEntries.Task

I accept the start and end dates in a form and pass it like shown below. WorkDate is a column in the TimeTracker table and is not present in any other table.

Code:
strWhere = "WorkDate BETWEEN #" & txtMgrRptStartDate & "# AND #" & txtMgrRptEndDate & "#"
DoCmd.OpenReport "rptTotalProjectHours", acViewPreview, "qryTotalProjectHours", strWhere, acWindowNormal

When the report is invoked, I get a box where it says
"Enter parameter value" for Workdate..

Is there anyway I can get rid of the prompt? I never thought you needed the column name in the SELECT statement to be able to run this.

I should add the I tried the query with the WorkDate hardcoded in there and it worked fine and returned the correct results

I have attached the cut down version of the database that I am working on.Open up the frmManagerReport Form
Leave the Employee drop down empty
Enter the start and end dates ( I have used 4/1/2015 and 4/30/2015)
Select the 3rd option "Generate Tasks by Total Hours"
click on Run
When you do that you will see the prompt come up. Enter any date and you will see the report. The report generated uses the results from the query and does not filter on the date selected in the form. This is what I have been struggling to fix since yesterday but have reached nowhere..

View 11 Replies View Related

Reports :: Remove Prompt While Running Report

Apr 8, 2015

I have a report that is created from the following query (qryTotalProjectHours). What I am trying to do is get the total hours spent on Tasks within a given time period.

Code:

SELECT TasksEntries.Project, TasksEntries.Task, Sum(TimeTracker.WorkHours) AS TotalHours
FROM TasksEntries INNER JOIN TimeTracker
ON (TasksEntries.EmployeeId = TimeTracker.EmployeeId) AND (TasksEntries.TaskID = TimeTracker.TaskId)
GROUP BY TasksEntries.Project, TasksEntries.Task;

I accept the start and end dates in a form and pass it like shown below. WorkDate is a column in the TimeTracker table and is not present in any other table.

Code:

strWhere = "WorkDate BETWEEN #" & txtMgrRptStartDate & "# AND #" & txtMgrRptEndDate & "#"
DoCmd.OpenReport "rptTotalProjectHours", acViewPreview, "qryTotalProjectHours", strWhere, acWindowNormal

When the report is invoked, I get a box where it says
"Enter parameter value" for Workdate..

Is there anyway I can get rid of the prompt? I never thought you needed the column name in the SELECT statement to be able to run this.I should add the I tried the query with the WorkDate hardcoded in there and it worked fine and returned the correct results

View 5 Replies View Related

Reports :: Running A Report Outside Of Access For General Users

Mar 28, 2014

My database is slowly coming together. For the final part of this phase i would like to create a shortcut on each users desktop which runs a summary report of information within my database.

I have criteria set so upon opening the report the user is asked for which address they wish to see information from which works great. But I do not want users to have access to the database, I just want them to be able to click a shortcut, be asked what address they are looking for and for the report to ping up in a 'Print Preview' type layout so information can be seen and displayed but not altered. All users have the access program.

View 2 Replies View Related

Reports :: Subtracting From Previous Line In Report To Make Running Total

Jun 16, 2014

I have a database and one of the functions is to track the purchase of fuel. Part of purchasing fuel is registering what the current odometer reads. My query gets the Vehicle ID, Date of Transaction and Odometer reading. I want to show a report that shows how many miles the vehicle is has traveled for a certain amount of time. If it's for 2013 then I'll put the criteria for 2014 in the date. This will give me a list of all vehicles and their odometer readings. I then sort the date by ascending.

In the report I group on vehicle ID and then I want to show all their transactions and add up how many miles were driven.

Vehicle 1

1/2/201
1/5/2013
1/15/2013
ETC...
Total Miles Driven in 2014: XXXXXX

View 1 Replies View Related

Reports :: Access 2007 Crashes When Running Report Based On Query

Apr 14, 2014

I have DB in access 2007. I have a report that is uses a select query to generate the information for the report. It has been working great, But however lately like maybe with in the last month, it has been causeing Access 2007 to crash. I am having the same issue with another DB that uses the same information but that information is imported in. both Databases have worked great up until two months ago. Microsoft states that it is because of the program. I have tried to repair the DB by using the Repair option. I am confused as to why this would be happening. I can create a new report and it seems to work. but I do not want to change all the DB on everyone's computer just for this reason. I also have two buttons on my report that utilize macros to close or print the report.

View 6 Replies View Related

Queries :: Using Input From A Form As Criteria - Error When Running Report / Query

Aug 18, 2015

I have a query that uses the input from a form as criteria, which is then used in a report. The form input is a drop down based on another table. This is a sales pipeline report, and the list is a list of sales people. The report works perfect for all sales people except one. When I run it for the one, I get the following error:

"This expression is is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables".

I DO NOT get the same error when running the query by itself - so assuming there is something in the report causing this. I do have some sum formulas in the report.

Again, no other salespersons selected cause this error -- so I am assuming there is something in the dataset for this person that is causing the error.

View 8 Replies View Related

Help On A Report With Dates

Nov 6, 2004

I have a tblCatalogue with fields packetNo (as integer), sendDate, shipDate and deliverDate (as date).
How can I make a report to show for each month how many packets I have sent, how many I shipped and how many I delivered ?

I have tried 3 separate queries using QBE
FIRST QUERY
the first field defined as GroupA: Format([tblCatalogue].[sendDate];"mmm yyyy")
and the second field defdined packetNo with Total set to Count

SECOND QUERY
the first field defined as GroupB: Format([tblCatalogue].[shipDate];"mmm yyyy")
and the second field defdined packetNo with Total set to Count

AND THIRD QUERY
the first field defined as GroupC: Format([tblCatalogue].[deliverDate];"mmm yyyy")
and the second field defdined packetNo with Total set to Count

Each of the queries gives me what I want for each month, like :
SEP 2004 20
OCT 2004 15
NOV 2004 3

What I really need though is to have something like:
Packets sent Packets Delivered Packets Shipped
SEP 2004 20 6 25
OCT 2004 15 8 30
NOV 2004 3 5 15

I have tried to achieve what I need using the following Function, but ended nowhere:

Public resultMonth(12) As String

Public Function Send() As Long
Dim sqlSend As String
Dim rsSend As Recordset
Dim dbSend As Database
Dim sendDate As Date
Dim monthSend, dayFrom, dayTo As Integer

On Error Resume Next
For monthStat = 1 To 12
If monthStat = (1 Or 3 Or 5 Or 7 Or 8 Or 10 Or 12) Then
dayTo = 31
ElseIf monthStat = (4 Or 6 Or 9 Or 11) Then
dayTo = 30
ElseIf (monthStat = 2 And Int(Year(Now) / 4) = (Year(Now) / 4)) Then
dayTo = 28
ElseIf (monthStat = 2 And Int(Year(Now) / 4) <> (Year(Now) / 4)) Then
dayTo = 29
End If
Set dbSend = CurrentDb
sqlStat = " SELECT compul FROM tblCatalogue " & _
" WHERE sendDate BETWEEN # " & Year(Now) & " / " & monthSend & " / 01 # " & _
" AND # " & Year(Now) & " / " & monthSend & " / " & dayTo & " # "
Set rsSend = dbStat.OpenRecordset(sqlSend, dbOpenSnapshot)
If Not rsSend.EOF Then
rsSend.MoveLast
If rsSend.RecordCount > 0 Then
resultMonth(monthSend) = rsSend.RecordCount
End If
End If
Next monthSend
End Function

Public Function test()
Send()For I = 1 To 12
MsgBox (I & " = " & resultMonth(I))
Next I
End Function

The above code gives me the correct numbers but again I cannot get a report with all packets send, shipped or delivered for each month of the year.

May be I am on the wrong track. Can I have some guidance how to achieve my report ?

View 3 Replies View Related

Filtering Dates On Report

Oct 6, 2006

hi!
i tried searching the forum for a possible solution to my problem. unfortunately, no luck so far.

Here's my problem.
i'm working with a linked table in access with a date field (service_dt) formatted as a text. if i open the table, the date shows up as 1-Jan-2006. i use this table to populate a report.

im trying to filter the report so that it would show records that have a specific date range.
here's what i write on the filter of the report:
service_dt Between #01/01/2006# and #12/31/2006#
unfortunately, its not filtering properly.
i would appreciate any thoughts.

thanks.

View 3 Replies View Related

Chosing Dates For Report

Dec 7, 2006

Hi,

I need item name, total quantity sold, total quantitiy delivered.

I need some thing that lets me put in two dates, the start date and end date.

Th Sql code for some reason dont' not give me the right result. It must be wrong!!!:rolleyes: Help me fix it!!!


SELECT DeliveryAA.itemnameAA, Sum(DeliveryAA.delqtyAA) AS SumOfdelqtyAA, Sum(ItemSaleAA.saleqtyAA) AS SumOfsaleqtyAA, DeliveryAA.timedateAA
FROM SupplierAA INNER JOIN (SaleAA INNER JOIN ((DepartmentAA INNER JOIN DeliveryAA ON DepartmentAA.deptnameAA = DeliveryAA.deptnameAA) INNER JOIN ItemSaleAA ON DepartmentAA.deptnameAA = ItemSaleAA.deptnameAA) ON SaleAA.salenoAA = ItemSaleAA.salenoAA) ON SupplierAA.splnoAA = DeliveryAA.splnoAA
GROUP BY DeliveryAA.itemnameAA, DeliveryAA.timedateAA
HAVING (((DeliveryAA.timedateAA) Between #1/1/2004# And #12/31/2004#));

View 1 Replies View Related

Chosing Dates For Report

Dec 7, 2006

Hi,

I need item name, total quantity sold, total quantitiy delivered.

I need some thing that lets me put in two dates, the start date and end date.

Th Sql code for some reason dont' not give me the right result. It must be wrong!!!:rolleyes: Help me fix it!!!


SELECT DeliveryAA.itemnameAA, Sum(DeliveryAA.delqtyAA) AS SumOfdelqtyAA, Sum(ItemSaleAA.saleqtyAA) AS SumOfsaleqtyAA, DeliveryAA.timedateAA
FROM SupplierAA INNER JOIN (SaleAA INNER JOIN ((DepartmentAA INNER JOIN DeliveryAA ON DepartmentAA.deptnameAA = DeliveryAA.deptnameAA) INNER JOIN ItemSaleAA ON DepartmentAA.deptnameAA = ItemSaleAA.deptnameAA) ON SaleAA.salenoAA = ItemSaleAA.salenoAA) ON SupplierAA.splnoAA = DeliveryAA.splnoAA
GROUP BY DeliveryAA.itemnameAA, DeliveryAA.timedateAA
HAVING (((DeliveryAA.timedateAA) Between #1/1/2004# And #12/31/2004#));

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved