subforms

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I have a form that shows teachers' details, including a field with the
language they teach (English or Spanish).

There are also two subforms on the page because a teacher can teach English
or Spanish.
The two forms show all the classes that that teacher has. As they only teach
one language, on of the subforms will be empty.

I want to have only one subform that will change from English to Spanish
classes depending on the language in the language field.

The subforms are taken from a single table but using the teacher reference
( a field in the main form) as a filter.

Any help will be greatly apreciated.

jeff
 
Jeff,

I don't get it. Why do you have two subforms? Wouldn't it be a lot
simpler, and equally effective, if you just have one subform, to show
the teacher's classes? And if the teacher is an English teacher, then
the classes shown will be the English classes, and if the teacher is a
Spanish teacher, then the classes shown will be the Spanish classes.
 
thanks Steve for the advice

I have the subforms filtered on the teacher reference number. I would need
to create a subform and filter it using the teacher ref and the language.

Any advice on how I do that?

Thanks

jeff
 
Jeff,

Unless I'm missing something basic here... no you wouldn't. Isn't the
main form based on the Teacher? And presumably when you talk about
"filter", you mean that the LinkMasterFields and LinkChildFields
properties of the subform are set to the TeacherRef or whatever the
unique identifier for the teacher is? So doesn't that mean the subform
will show only the classes taught by that teacher? And didn't you say
that all the teachers are one or the other (English or Spanish) but not
both? So doesn't that mean that if a teacher is a Spanish teacher, and
if the subform shows all that teacher's classes, then the subform will
show Spanish classes without any need to "filter" by language?

If I am not understanding your requirements, I apologise... please have
another go at explaining what you want.
 
Hi Jeff,
I agree with Steve 100%.
but, I'm forced to assume, there is/are something(s) inherently different between the English & Spanish sub forms...Combo & list boxes with different row sources. Dates, captions, options etc. exclusive to one subform or the other. Is this the reason one generic subform isn't sufficient?
If this is the case, you can change a lot of the "option" controls with VBA, by manipulating their control sources, rowsource, recordsources etc.. contigent upon the main forms "English/Spanish" field. ....(for starters.)
It would be a bit premature to elaborate right now, until you confirm my assumptions are correct, if not, sorry about my misconception.
Is there something different about, either the Spanish or English sub forms, are they based on predefined scheduling dates & options. Do they need to be, after the fact, filtered, to determine stats at the end of the year?
When you get a chance, please elaborate!
 
Back
Top