D-Sect
01-14-2003, 11:23 AM
Hello -
I am making a simple form to edit records in a child table, which has a parent table.
Parent table "tblSchools" Child table "tblDepartments"
tblSchools has a PK of "schoolID" and the FK in tblDepartments is "schID".
A department cannot exist without a valid schoolID.
So my form will need to show "SchoolName" from tblSchools and all fields from tblDepartments.
For now, I just want to be able to edit/update info in the tblDepartments table, via a form.
I can do it using JUST the one table (tblDepartments), but I don't understand how to show the SchoolName from tblSchools and show the related records in tblDepartments.
If this was Access, I'd do a Main Form / Sub Form thing, but I am very new to VB6, so I'm not sure how to do it.
So my questions are:
1. Do I need to mess with Parent/Child data connections/commmands?
2. I can't do it using a view, correct?
That's it. I can use triggers to ensure referrential integrity later on, but now I am just concerned with making a simple edit form that also shows a couple fields from a parent table.
Thanks and let me know if you need more info.. I may know more than I need to do this already.
*D*
I am making a simple form to edit records in a child table, which has a parent table.
Parent table "tblSchools" Child table "tblDepartments"
tblSchools has a PK of "schoolID" and the FK in tblDepartments is "schID".
A department cannot exist without a valid schoolID.
So my form will need to show "SchoolName" from tblSchools and all fields from tblDepartments.
For now, I just want to be able to edit/update info in the tblDepartments table, via a form.
I can do it using JUST the one table (tblDepartments), but I don't understand how to show the SchoolName from tblSchools and show the related records in tblDepartments.
If this was Access, I'd do a Main Form / Sub Form thing, but I am very new to VB6, so I'm not sure how to do it.
So my questions are:
1. Do I need to mess with Parent/Child data connections/commmands?
2. I can't do it using a view, correct?
That's it. I can use triggers to ensure referrential integrity later on, but now I am just concerned with making a simple edit form that also shows a couple fields from a parent table.
Thanks and let me know if you need more info.. I may know more than I need to do this already.
*D*