473,396 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Create a subform that depends on the relationship of a related table

I have the following tables:
  • School - contains a list of schools
  • Staff - record staff at particular schools (school id is a foreign key)
  • Distribution - record when materials are distributed to a certain teacher (staff id and resource id are foreign keys)
  • Resource - contains a list of materials that can be distributed to a staff member

I have a form which is used for entering details of a school. It contains a subform that lists all the teachers at that school.

I want to create another separate subform in the school form that will record the distributions to each staff member. However, how do I constrain the list of staff to those that are recorded as being at the currently selected school?

I hope this makes sense. If not, I shall attempt to further clarify.
May 19 '10 #1
2 1246
slenish
283 100+
@rjgcooper
Hello,

Im having a little trouble understanding what you want to do but im going to take a guess and see if im on the right track.

sounds what you might want to do is create either in a subform or in the main form a drop down where you can select a school then, in another drop down it will reference that school name to a list of teachers, then you can select a teacher and then in a text box or drop down you can type in the distribution and resources for the teacher to go with the school.

I hope im on the right path ;)
May 19 '10 #2
Almost.

There is a form which has all the school information on it. Then there is a tab with a sub form for adding staff members to the school.

There is a second tab for the sub form described above which will contain the staff details (a relationship from the staff table) as well as data about the materials and requested. Does this make more sense?

I can get the sub form to work. But I cannot get the list of teachers to be limited only to those who are listed as being at the school, the record of which is currently open and active in the main form.

Does this clarify the situation?
May 19 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Fons Roelandt | last post by:
Heelo, I have to Update all fields from a table with the values of a related table, i've tried some querys i found on the internet, but nothing seems to word, i even tried to lookup the value...
2
by: Vikaspell | last post by:
I have a 2 dimensional table which i want to create in access. this full table i want associated with 1 primasry key or ID how can i do this currently i am entering the table in excell and linking...
3
by: Gerry Abbott | last post by:
Hi all, Im using the after update event of a field from a bound form to add records using the recordset object, to a related table. However i'm getting the 3201 error, telling me I must have a...
1
by: philou | last post by:
HI, I would like to know if it is possible to create automatically a new entry iŽn a table who is in relation one to one to another one. I would like that a new entry be created in table B when...
1
by: md7546 | last post by:
Hi, first time posting to this group, but I have followed advice and examples for several months, so thank you. I work for a small telecommunications company. I have a simple Orders database...
2
by: jaYPee | last post by:
At last I have found the problem why I can't get to work w/ importrow. The fact is that I'm trying to import data to related table. But after importing data the foreign is blank. So thats why the...
4
by: Michael R | last post by:
Or is it not necessary to have that option on the related table field, as the primary table indexed field does that job? And is it a necessity to have the related table field to be indexed if I...
11
jhowells28
by: jhowells28 | last post by:
I have a subform for data entry purposes and I would like to populate a text box with a "suggested" value that will be pulled from a related table. I say "suggested" because the information stored...
1
by: QCLee | last post by:
Hello Sir, Im here again asking for help. I have a form and a subform relate to HVAC Windward Table. i have a SAVE button on the form that when clicked it saves data on the HVAC Windward Table but...
3
by: Codebug | last post by:
I have a form and would like to know the best method to link it to a related table so I can retrieve data from it to the form, and maintain this link if the Forms current record is changed. I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.