Need Help with a subform within the same form

laboi_22

New member
Local time
Today, 12:53
Joined
Nov 29, 2006
Messages
5
Hello everyone. I have a quick question. I am creating a staffing database for a nursing staffing agency. At present I have 3 tables: Enter/New nurses, Facilites, and Schedule a nurse. The schedule a nurse table is linked to Enter/new nurse by Nurse's name feild and to the facility feild by facility name feild. My primary index in each table is Nurse's Name (enter/new nurse) Facility (facility) and Nurse's Name (Shceudle a nurse).

I need to be able to enter schedules for each nurse. I created a form based on the schedule a nurse table using on feild Nurse's Name which is a pull down. I then created a subform based on the schedule a nurse table with all feilds excluding Nurse's Name. When I enter feilds in after I pull down the nurse's name it tells me the index is null and i can't enter any data.

I did this because I need to see (when I pull down a nurse's name) exactly each entry for that nurse under the schedule nurse's table. Can anyone tell me what I'm doing wrong or offer an suggestions as to what to do if this process can not be preformed. Thanks in advance.

Justin
 
I see several issues with your design like using spaces in the table names, etc., but as for the subform thing; In the most generic form you have a main table and a secondary table. Then a main form and a subform. Just as the two tables need to be set up with a one to many relationship, the two forms need to be set up with a 'Link child field' and 'Link master field' relationship. These properties can be found on the properties for the subform control. For a first time run, I would suggest you set up a relationship between the tables and let the wizard set up the form stuff when you create the subform control on the main form...

Hope all of this makes sense - And welcome to the forum. :)
 
Thanks

Thanks for the advice and the warm welcome. My question is this. My relationships are created among the three tables but they are all one to one. I think I would need to change to one to many only the index would be changed throughout. Is there another way to construct the tables that what I need would be possible or should I leave it as such and keep trying? Thanks again!
 
I'm not sure I understand your problem. Are you having a problem setting up the one to many relationship between the tables?
 

Users who are viewing this thread

Back
Top Bottom