list box query

illusion

Registered User.
Local time
Today, 08:30
Joined
Mar 25, 2004
Messages
16
i am working on a project which a part of it has to do with payments. what i am using for payments is a table where for each month that member pays the date of payment is recorded.

i have tblpayments(memberid,jan,feb,mar,apr,may,jun,jul)

if the member hasn't payed means that the month field will stay blank.

what i want is :

using a list box i want to select a month and check which members hasn't payed
 
illusion said:
i am working on a project which a part of it has to do with payments. what i am using for payments is a table where for each month that member pays the date of payment is recorded.

i have tblpayments(memberid,jan,feb,mar,apr,may,jun,jul)

if the member hasn't payed means that the month field will stay blank.

what i want is :

using a list box i want to select a month and check which members hasn't payed


In case you are just checking one month...use this

Code:
SELECT tblpayments.memberid,"& Request.Form("month") &"
FROM tblpayments
WHERE ((("& Request.Form("month") &") Is Null))

here request.form("month") ......'month' is the listbox name....
put your listbox name instead of 'month'..
This would display all memberid's who have not paid for the month that is selected in the list box..

tel me if I'm wrong..
 
You should normalise your db, at the minute you've re-created a spreadsheet in Access
 
some1 helped me and i have attached an example.

now i want to change it doing this: list all members that have not payed until this month and which months are owing.

i tryed to change the query in the example to this but is not working...
Code:
WHERE ((month([PaymentDate]))<month(date()));

thank you
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom