Subform not syncronising with mainform

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

Jeff

Hi All,

I have a form with fields txtStudentRef txtAno and txtSemester.

There is also a subform to show the Details the student studies in my
school. On the subform are the same textboxes with the same information
and the student's details.

I have the Subform relationship as:

Master:txtStudentRef;txtAno;txtSemester
Child:txtStudentRef;txtAno;txtSemester

When I open the form, the form shows the details for that student during
the semester of that year.

The problem is that there are several buttons that change the subform
shown. When I change forms, and then change back, the relationship
doesn't update if I change the semester and year in the mainform. It
works ok when I open the mainform and change things, but when I click
another button to show a different subform and then change back, it
won't update the subform to reflect the txtboxes on the mainform.

Any ideas what's going wrong?

Thanks

Jeff
 
Jeff said:
Hi All,

I have a form with fields txtStudentRef txtAno and txtSemester.

There is also a subform to show the Details the student studies in my
school. On the subform are the same textboxes with the same information
and the student's details.

I have the Subform relationship as:

Master:txtStudentRef;txtAno;txtSemester
Child:txtStudentRef;txtAno;txtSemester

When I open the form, the form shows the details for that student during
the semester of that year.

The problem is that there are several buttons that change the subform
shown. When I change forms, and then change back, the relationship
doesn't update if I change the semester and year in the mainform. It
works ok when I open the mainform and change things, but when I click
another button to show a different subform and then change back, it
won't update the subform to reflect the txtboxes on the mainform.

Any ideas what's going wrong?

Thanks

Jeff

I should add what I've noticed:

The txtboxes on the mainform are not linked to any table or query. They
are unrelated and only for user input filter.

The Subform has master-child relationship like this:

Master: AlunoRef; AnodoSemestre; AnodoCurso
Child: AlunoRef; AnodoSemestre; AnodoCurso


When I change the subform to with a button to show another form in the
space and that subform doesn't have the two fields, when I go back to
the Details as the Subform, it doesn't recognise or find those fields in
the master link to link master-child filter. I get:

Master: AlunoRef
Child: AlunoRef; AnodoSemestre; AnodoCurso

I guess it has something to do with the fact that those two mainform
fields are not pulled from the table (they aren't in the table, only in
the subform).

Any help really appreciated,

Jeff
 
the subform changes it's form when the user clicks on a button. There
are various buttons to change the SourceOrigin for the subform to show
different forms in the same subform space.

Even when the other subform forms don't have the fields, it doesn't work.

When the subform shows the form Details and I click the button
'Details'in mainform, the subform shows Details form again but with the
first record, not the filterd record.

this is driving me crazy!
 
Back
Top