Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Posts
    13

    union adding new employees

    Hello

    i am having some trouble

    in my design of my database i have a union of employees within a company the two types of employees i have coming from it are nurses and doctors.

    i created two forms one for dcotors and one for nurses to allow a user to input new doctors and nurses but i can only input new doctors but not new nurses as i get this message 'you cannot add or change a record becuase a related record is required in table 'tbldoctor''

    can i have some advice please

  2. #2
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    710
    First thing that occurs to me is create a generalization hierarchy with employee as the supertype holding common employee information and a subtype holding doctor information and a second subtype holding nurse information.

    Employee(EmployeeID, EmployeeType, employee info)

    Doctor(EmployeeID, DoctorID, doctor info)

    Nurse(EmployeeID, NurseID, nurse info)

  3. #3
    Join Date
    Dec 2003
    Posts
    13

    union adding new employees

    Originally posted by certus
    First thing that occurs to me is create a generalization hierarchy with employee as the supertype holding common employee information and a subtype holding doctor information and a second subtype holding nurse information.

    Employee(EmployeeID, EmployeeType, employee info)

    Doctor(EmployeeID, DoctorID, doctor info)

    Nurse(EmployeeID, NurseID, nurse info)
    How would i set something like this up in access i know from what you have said i need 3 tables nurse employee and doctor and i think only one form to enter this data to add new employees whether doctor or nurse - i take it i am along the right lines there?

    i also take from what you have said that employee type would be a combo box?

    any other advice would be nice?........

    thanks for the assisstance

    Bekka

  4. #4
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    710
    You could have one form employee with two subforms doctor and nurse. The subform that is displayed depends on which you choose from a combo box in the employee form.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •