Lookup

NigelShaw

Registered User.
Local time
Today, 01:49
Joined
Jan 11, 2008
Messages
1,575
Hi,

my form displays a list of people. i have a button that makes a payment to people in the list but i only want to make 1 monthly payment each month.

how could i check the list if the person i want to pay is already there? if the person is there, then code1() if the person is not there then code2()

code1() = update existing payment schedule
code2() = new payment schedule

the list of people is on a subform bound to a query"PeoplePaymentsQry"

many thanks,

nigel
 
Simple Software Solutions

The form that list the people who need paying will be based on an underlying query for its recordsource. This query would be on the lines of

Select * From MyTable Where Paid = False

Then each time you process a person perform a requery on the list this will drop the person from the list.

To achive this you will need a couplle of new fields (if not already there) one being a date/time field to hold the date last paid. The other being a boolean to say they have been paid this month. At the beginning of each month you would run a query to reset all the flags to false.

CodeMaster::cool:
 
Hi,

i have this already. my form shows all payments made with a chkbox and the query only shows records with records that are false. this gies me the "not completed" list.

what i am trying to achieve is not duplicating the person receiving the payment to the list. if the person is on the list, then update the current payment schedule. if the person is NOT on the list, then create a new payment schedule.

regs,


Nigel
 
Simple Software Solutions

So if I get this right you want to show all payees with a flag as to their status (True or False).

If you select as payee that is set to true then perform an Update, conversely, if it is set to False then perform a Append.

Another solution would be to have option group on the form with three options:

Paid
Unpaid
Both

Then if you click on the option it will rewrite the sql for the combobox to show/hide specific payees. Then when you click your submit button depending on what option is currently selected it performs the appriopriate action.

CodeMaster::cool:
 

Users who are viewing this thread

Back
Top Bottom