Re: Need and Oracle Forms2000 expert...

From: DanHW <danhw_at_aol.com>
Date: 16 Dec 1999 01:16:28 GMT
Message-ID: <19991215201628.22311.00001054_at_ng-fy1.aol.com>


>
>I am trying to set the "display" property of a button to "true" from my
>code. At compile time, I am getting an error saying "bad bind variable
>:block1.cmdgetnext" on the line that says:
>it_id := Find_Item(:BLOCK1.cmdgetnext);
>but that item does exist. The button is not displayed initially, but I
>want to display it later from the code.
>
>The code is below. Thanks for your help!
>Andy
>---------------------------------------
>declare
>cursor divrows is
> select division, abv from frt.division
> order by division, abv;
>holddiv char(15);
>holdabv char(15);
>it_id item;
>begin
> :GLOBAL.rowcnt := 1;
> open divrows;
> fetch divrows into holddiv, holdabv;
> :block1.txtdivision := holddiv;
> :block1.txtabv := holdabv;
> close divrows;
> it_id := Find_Item(:BLOCK1.cmdgetnext);
> set_item_property(it_id,displayed,property_true);
>end;
>
>
>

try
it_id := find_item('block.cmdgetnext');

Quote the literal field name, and without the ':'. If you have a variable holding the name of the field, pass it without the quotes.

declare
field_name varchar2(30);
begin
field_name := 'block1.cmdgetnext';
it_id := find_item(field_name)
...  

Dan Hekimian-Williams Received on Thu Dec 16 1999 - 02:16:28 CET

Original text of this message