FORMS 3 newbie question

From: Phil Roberts <proberts_at_iglou.iglou.com>
Date: Sat, 28 Jan 1995 02:05:06 GMT
Message-ID: <D33F4L.7Ly_at_iglou.com>


Please answer this newbie SQL*Forms 3 question if you can.

I have a form where we enter a code. When the code is entered how do I get the name for that code to appear in an other field that I don't want to allow input in.

What we store in the table is an employee number, the award code, and the award date. I want the full name of the award to appear on the screen when the award code is input.

We have an award_code table which contains only the award codes and the award name. As a short example:

  AWARD_CODE                           AWARD_NAME
  ----------            -----------------------------------------------
  EMPOFMON              EMPLOYEE OF THE MONTH
  EMPOFYER              EMPLOYEE OF THE YEAR
  ONSPTAWD              ON THE SPOT CASH AWARD
  QUALSVCA              QUALITY SERVICE AWARD


What I want to input on the form is:

  EMPLOYEE # AWARD_CODE AWARD DATE

  • ---------- ----------- 01234 EMPOFMON 941201 09876 ONSPTAWD 931224 32145 QUALSVCA 950101
What I want to display on the form is below with only the above input being saved in the EMP_AWARDS table (The reason for the full award name is so the data entery person can verify they've entered the correct code without having to type the longer full name in):
  EMPLOYEE #    AWARD_CODE   AWARD_NAME                    AWARD DATE
  ----------    ----------   ---------------------------     -----------
   01234        EMPOFMON     EMPLOYEE OF THE MONTHE        941201
   09876        ONSPTAWD     ON THE SPOT CASH AWARD        931224
   32145        QUALSVCA     QUALITY SERVICE AWARD         950101

How do I do this so that when the code is entered it checks the AWARD_CODE table and pops up the AWARD_NAME for on-screen display without saving the AWARD_NAME in the EMP_AWARDS table? Is this a master-detail relationship?

Thanks for your assistance.

               Phil Roberts   |   proberts_at_iglou.com 
               -------------------------------------------
               IgLou - The Internet Gateway of Louisville
Received on Sat Jan 28 1995 - 03:05:06 CET

Original text of this message