If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > union adding new employees

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-23-03, 16:47
BabyBekka BabyBekka is offline
Registered User
 
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
Reply With Quote
  #2 (permalink)  
Old 12-23-03, 20:39
certus certus is offline
Registered User
 
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)
__________________
visit: relationary
Reply With Quote
  #3 (permalink)  
Old 12-27-03, 09:37
BabyBekka BabyBekka is offline
Registered User
 
Join Date: Dec 2003
Posts: 13
union adding new employees

Quote:
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
Reply With Quote
  #4 (permalink)  
Old 12-27-03, 12:08
certus certus is offline
Registered User
 
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.
__________________
visit: relationary
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On