Link to home
Start Free TrialLog in
Avatar of stressball
stressball

asked on

Urgent Date Question

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
ASKER CERTIFIED SOLUTION
Avatar of Mikeh
Mikeh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stressball
stressball

ASKER

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.