Subform not synconising with mainform

  • Thread starter Thread starter Jeff
  • Start date Start date
Help!

See earlier post with same name.

Please repost, Jeff. I've got paying work to do in addition to
volunteering here; I'd rather not spend time searching Google Groups.

John W. Vinson[MVP]
 
John said:
Please repost, Jeff. I've got paying work to do in addition to
volunteering here; I'd rather not spend time searching Google Groups.

John W. Vinson[MVP]


Sorry, John... Note taken!

Here goes...

I have a form and subform.

The form shown in the subform varies depending on which button (in the
mainform) is pressed. Each button changes the form shown in the Subform
space.

The forms are all syncronised like this:

Master:AlunoRef;AnodoCurso;SemestredoCurso
Child:AlunoRef;AnodoCurso;SemestredoCurso

The fields AnodoCurso and SemestredoCurso on the mainform are unbound
textboxes as number. The formats are the same for all fields.

The problem is:

When I open the mainform, everything works fine. When I change the form
in the subform by pressing a button, it doesn't filter the form in the
subform anymore, it shows the first register.

Sometimes it changes the links to:

Master:AlunoRef;
Child:AlunoRef;AnodoCurso;SemestredoCurso

I've tried coding in VBA:

Me.SubDetails.LinkChildFields = "AlunoRef;AnodoCurso;SemestredoCurso"
Me.SubDetails.LinkMasterFields = "AlunoRef;AnodoCurso;SemestredoCurso"

But this gives an erro message:

the number of master fields must be the same as the child fields.

When I put the cursor ove the line, the child shows perfect but the
master only shows AlunoRef.

I can't figure this out.

Any ideas? I really need to get this working!

Thanks

Jeff
 
Back
Top