Solved

Urgent Date Question

Posted on 2001-06-23
2
180 Views
Last Modified: 2008-02-01
Hi,
I need to write the following query in Access:

I have a table called Loan,
I need to total the number of installments owing for a particular month or year where the balance is greater than zero, my problem being I don't know how to use the date functionality in Access the query needs to work in both 97 and 2000 but more importantly in 97.
I have the query I wrote in Oracle just quickly to get the results for June so that I could compare my Access results to ensure when I get the query in Access going my results are correct:

select sum(installment) Total from loan
where nextpaymntdate > last_day ('01-MAY-01')
and nextpaymntdate <= last_day('01-JUN-01')
and balance > 0;

I would like to get the user to enter the month or year they need the data from and the query to bring up just that month or year the user has chosen.  The date in Access format is e.g. 1-6-01.

If you can help a busy person it would be most appreciated
0
Comment
Question by:stressball
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
Mikeh earned 50 total points
ID: 6222618
this asks the user for two parameters startdate and endate and gives the total for installments

SELECT Sum(loan.Installments) AS SumOfInstallments
FROM loan
WHERE ((loan.NextPaymentDate>[startdate] And loan.NextPaymentDate<[enddate]) AND (loan.Balance>0));
0
 

Author Comment

by:stressball
ID: 6222991
Thank you, thats the conclusion I came to but I am not getting any results returned, and I know I should as my Oracle query returns the correct results.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

742 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question