Parent and Child data commands in VB6

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*

Data
01-14-2003, 01:49 PM
I'm not familiar enough with VB to help. :(

Seems like something that easy would be fairly obvious though.

Xaphan
01-14-2003, 08:15 PM
I know a little bit about vb, but not this much...try posting it in the main forum and see if you get any responses...I seem to get better programming help there

Merlock
01-15-2003, 11:27 AM
yah programming questions are really a main forum thing... we are just dumb IT guys with too much time on our hands ;)

Data
01-15-2003, 11:33 AM
I bet the programmer schmoes in the Scripting and Modding forum would know best.

Merlock
01-15-2003, 11:35 AM
Originally posted by Data
I bet the programmer schmoes in the Scripting and Modding forum would know best.

Yah, go talk to those dorks ;)

D-Sect
01-15-2003, 09:15 PM
Fuck! I thought the main forum was for penis talk and dumb shit.

I'll maybe try that if I bring myself to breaking the cycle.


(tek-tips.com)