Re: how to make LOV field non-editable but LOVable in Forms 6i

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Thu, 22 Aug 2002 15:18:53 GMT
Message-ID: <3D6500CD.15C29B11_at_exesolutions.com>


dreyz wrote:

> BTW,
> Checking off the Update Allowed prop will not work as I would like the user
> to be able change the dept.
>
> "dreyz" <dreyzachs_at_hotmail.com> wrote in message
> news:3VY89.190399$UU1.35394_at_sccrnsc03...
> > Hi Folks,
> >
> > How do I make a field non-editable (using the keyboard) but still allow
> the
> > user to select a value into it from a LOV ?
> >
> > I have a table (emp) that has a foreign key (deptno) into another table
> > (dept).
> > In my form I have a block which is based on emp. I want to show the dept
> > name against each employee. Also while adding employees I want the user to
> > be able to select a dept from a LOV.
> >
> > I have
> > 1) created a non database field in the emp block.
> > 2) hidden the deptno field from the emp block.
> > 3) Created a LOV that selects dept name and deptno from the dept table
> into
> > the the non database display field created above and the hidden deptno.
> > 4) have attached the LOV to this non-db field.
> >
> > But I do not wish to allow the user to type into this field. I want him to
> > be able to only select from the LOV.
> >
> > Any ideas ?
> >
> > TIA.
> > Dreyz.
> > Sorry for the long post..... :P
> >
> >
> >
> >
> >

Rather than using the standard F9 key to access the LOV put a small button to the side of the field. The code on the button will be something like this:

DECLARE
 x BOOLEAN;

BEGIN
  x := SHOW_LOV('cust_acct_lv');
END; I usually use a display item rather than a text items and thus do not let the user edit the field. If the user wants to change the field value ... they can press the button again.

Daniel Morgan Received on Thu Aug 22 2002 - 17:18:53 CEST

Original text of this message