Calculation for a balance(non database item) [message #149065] |
Tue, 29 November 2005 22:42 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
robhulse
Messages: 35 Registered: November 2005
|
Member |
|
|
Hi, im having a little trouble with a form that i am trying to create.
The form itself list a particular member of a club in one datablock and via a foreign key link it references all the lessons which that particular member has been involved in another datablock. The form displays all the relevant details plus a procedure which updates a lesson costing, which is activated when a button is pressed(just basically displaying that the procedure works.
The problem i have concerns a non database item which i am trying to use to add all that members lesson costs up into a single member balance. i have produced the following program unit:
PROCEDURE Member_balance(mem club_member.shotgun_cert_id%type)
IS mbalance NUMBER;
BEGIN
SELECT SUM (lesson_charge)
INTO mbalance
FROM lesson_schedule,club_member
WHERE lesson_schedule.fk1_shotgun_cert_id = mem;
EXCEPTION
when
NO_DATA_FOUND
then
message ('Invalid Member ID - Please re-enter');
raise form_trigger_failure;
END;
I have also referenced this program unit via a when-validate-form trigger on the display area and set the property values of the area to number and non database item.
Can anyone help because i would love to add this finishing touch to my form?
Thanks v.much if you can:)
|
|
|
|