Buggy selection in form.

H

H. Martins

Hi.

In a form header I have three ComboBoxes (CB).

cmbbxTurmaVazia and cmbbxDisciplina queries are straight including all
registers of two different tables.

cmbbxNSerieAula query works over a third table but has in mind the
result of cmbbxTurmaVazia and cmbbxDisciplina as:

SELECT tblTurmaDisciplinaAula.lintTurmaDisciplinaAulaKMaster,
tblTurmaDisciplinaAula.lintTurmaVaziaBKSlave,
tblTurmaDisciplinaAula.lintDisciplinaKSlave,
tblTurmaDisciplinaAula.lintNAulaManual,
tblTurmaDisciplinaAula.dateDataAula
FROM tblTurmaDisciplinaAula
WHERE (((tblTurmaDisciplinaAula.lintTurmaVaziaBKSlave)=[forms].
[frmSala].[cmbbxTurmaVazia]) AND
((tblTurmaDisciplinaAula.lintDisciplinaKSlave)=[forms].[frmSala].
[cmbbxDisciplina]))
ORDER BY tblTurmaDisciplinaAula.lintNAulaManual;


It all works well except when cmbbxTurmaVazia or cmbbxDisciplina are
re-selected.

To avoid trouble I issue a couple line codes at cmbbxTurmaVazia and
cmbbxDisciplina AfterUpdate as:

cmbbxNSerieAula = Null
cmbbxNSerieAula.Requery
Me.Requery

It all works fine except that when re-selecting cmbbxTurmaVazia or
cmbbxDisciplina the new selection works nicely in what respects to
cmbbxNSerieAula but when I selectcmbbxTurmaVazia or cmbbxDisciplina
the new selection does not remain (shown - is not shown) in the
changed ComboBox although cmbbxNSerieAula 'understands' the 'not shown
selection' and works OK. I mean, it all works fine but the selected
records are not shown (do not stay) in cmbbxTurmaVazia or
cmbbxDisciplina.

If I immediately select again the selected record remains shown.

Thanks for any help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top