Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP PLEASE !!!!

Status
Not open for further replies.

christopher007

Instructor
Nov 14, 2003
29
0
0
GB
I have a table names Staff Members with fields, Name, Job and Area.
I have a second table names Courses Attended with fields Name, Course and Date.
I have a relation ship between Name and Name in the to tables, ref-integrity turned on and one to many shows ok in relationships.

My question is can I make a form with Staff members table and have a subform of Courses attended table on it.

If I add a new record in the subform will the Name field populate automatically due to the relationship ?

What I get in the subform is the main forms name for all new records and access says the records are read only if I add or edit any. I have checked for the obvious right back to the table.

Am I doing something wrong, is it actually possible to add a new related record in a sub form ?

Thanks in advance Chris.


 
Hi Chris,

For your relationship you should set it as 1 to many.

Within your table design view for the Staff Member table you can set the property of "Subdatesheet Name" to table.courses and "Link Child Field" and "Link Master Field" both to "Name"

If you set this up correctly when you open the Staff Member table in record view then you should see that a + sign appears next to all of the records. if you click the + sign it will show records from the Course table that relates or is linked by "Name"

By doing this, it should allow you to edit and delete within your froms as you want it to.



Currently seeking for position around Boston, MA. kenphu@yahoo.com
 
There is a property in the sub form called Link Child Fields, and one called link Master fields.

Make sure that these point to the correct field on the main form to make the link. This should prevent it from bringing up everything for everyone, and allow you to edit.

 
Thanks but have checked all this so far please see my other post which i think explanes my problem clearer.
 
As my response to your 'other' thread explained, your problem is due to you using the KEYWORD "NAME" as a field name. This is nearly always a bad thing, as is using other Access keywords as field names.

If you fix this, I bet your problem will be solved.

Jim

Don't be sexist - Broads hate that.
Another free Access forum:
More Access help stuff at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top