Re: Forms 4.5 - Master Detail Problem

From: <scotten_at_my-dejanews.com>
Date: Tue, 15 Sep 1998 06:24:25 GMT
Message-ID: <6tl16n$1pd$1_at_nnrp1.dejanews.com>


David,

Why don't you create a view for the skill_profile table. In the view you look up the skill description for every skill_code. You then can base your form on the Employee table and the newly created view.

use a view like this:

CREATE VIEW view_skill_profiles AS
SELECT

  SKILL_PROFILE.employee_no,
  SKILL_PROFILE.skill_code,
  SKILL_PROFILE.Skill_level,

  SKILL.description
FROM
  SKILL_PROFILE,
  SKILL
WHERE
  SKILL_PROFILE.SKILL_CODE = SKILL.SKILL_CODE; Good luck,

Sicco Otten

 In article <35F8E175.2938_at_capgemini.co.uk>,   David Donaldson <david.donaldson_at_capgemini.co.uk> wrote:
> I'm trying to create a from which has two master detail relationships
> but have hit a problem. The background to the form is as follows:
>
> This part of the database is used to track employees and their skills.
> The entity/relationship diagram looks like:
>
> Employee---<Skill_profile>---Skill
>
> The columns in the tables are:
>
> Employee:
> Employee_no
> First_name
> Surname
> Grade
>
> Skill_profile:
> Employee_no
> Skill_code
> Skill_level
>
> Skill:
> Skill_code
> Description
>
> What I'm trying to do is create a form which will show all the skills
> for one employee. I therefore set up relations under the employee and
> the skill_profile blocks with the following conditions:
>
> Employee:
> Master Employee
> Detail Skill_profile
> Join condition: Employee.employee_no = Skill_profile.employee_no
>
> Skill_profile:
> Master Skill_profile
> Detail Skill_code
> Join condition: Skill_profile.skill_code = Skill.skill_code
>
> The problem is that because I've set up an inverted relationship between
> the skill profile and skill, although multiple records are displayed for
> the skill_code and the skill_level, only one record is returned for the
> description. In order to display each description (which is taken from
> Skill) for each Skill_code(taken from skill_profile) the user has to
> click in each skill_code field.
>
> Is there a way that I can set this up so that all the descriptions are
> displayed for all the skill_codes?
>
> I'd really appreciate any advice as I'm a new user to Dev/2000. Thanks.
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Tue Sep 15 1998 - 08:24:25 CEST

Original text of this message