forcing blank in combo box

  • Thread starter leahf via AccessMonster.com
  • Start date
L

leahf via AccessMonster.com

There is a list of teachers in a combo box on a form with parameters.

After a teacher is chosen, another form is opened. When that second form is
closed I do not want the same teacher to appear in the combo box parameter of
the first form.

Is there a way to force a blank in the field when returning to the first form
with the parameters so that the user will again choose from the list of
teachers? I would like the rest of the parameter fields to remain the way
they are.
 
G

Graham R Seach

If you set the second form's Modal property = True, then just after calling
DoCmd.OpenForm... set the combo's Value property = Null.
DoCmd.OpenForm "frmSecondForm"
Me!cboCombo = Null

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
 
L

leahf via AccessMonster.com

The first form is not opened from the second form so it didn't work.
However, what I did do was set the combo box to null upon closing the second
form. That worked.

Thanks for your help.
Leah
If you set the second form's Modal property = True, then just after calling
DoCmd.OpenForm... set the combo's Value property = Null.
DoCmd.OpenForm "frmSecondForm"
Me!cboCombo = Null

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
---------------------------
There is a list of teachers in a combo box on a form with parameters.
[quoted text clipped - 9 lines]
teachers? I would like the rest of the parameter fields to remain the way
they are.
 

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