Re: Form 4 question

From: Ken Shirey <kenshirey_at_aol.com>
Date: 9 Oct 1994 13:33:02 -0400
Message-ID: <3799ge$dln_at_newsbf01.news.aol.com>


How about using a set of checkboxes labeled 'A'...'D', and use a pre-query trigger to update the 'where' clause for the box:

The simplest programming might be achieved by setting the values of the four checkboxes to : 1,2,4,& 8. You can then sum up these values, and get a picture of what they selected:

declare the_sum number
begin
the_number := :myBlock.box_A + :myBlock.box_B +:myBlock.box_C

                       +:myBlock.box_D;

if the_number = 0 then
 null;
else if the_number = 1 then
set_block_property('myBlock','default_where','WHERE dbtable.dbitem='A''); else if the_number = 2 then
set_block_property('myBlock','default_where','WHERE dbtable.dbitem='B''); else if the_number = 3 then
set_block_property('myBlock','default_where','WHERE dbtable.dbitem IN
'A','B'');

else if the_number = 4 then
set_block_property('myBlock','default_where','WHERE dbtable.dbitem='C''); else if the_number = 5 then
set_block_property('myBlock','default_where','WHERE dbtable.dbitem IN
'A','C'');

else if the_number = 6 then
set_block_property('myBlock','default_where','WHERE dbtable.dbitem IN
'B','C'');

(etc.)
I just threw this together online, so you may want to check syntax :-) I used this one a while back in a Froms4 app, and it worked. I wish I had the code, so I could send it to ya.
Good Luck
Ken Received on Sun Oct 09 1994 - 18:33:02 CET

Original text of this message