Requery combobox

  • Thread starter szag via AccessMonster.com
  • Start date
S

szag via AccessMonster.com

I have a form that includes a combobox that has the following in its on enter
event:

Private Sub cbProjectPhase_Enter()
Me.cbProjectPhase.Requery
End Sub

The query that is tied to this combox uses another field ("Cost Center") on
this form as criteria to select records for this combobox.

It works fine except when I go to the next record and click on that combobox
it removes what is showing in the previous record's combobox's field because
my selection "Cost Center" is different this time.

I understand why this happens but I don't know how to get around it. It
stores the bound information properly in the table but just doesn't show
correctly on the form. Any suggestions?
 
K

Klatuu

Requery the combo in the form current event:

If Not Me.Newrecord Then
Me.cbProjectPhase.Requery
End If
 
S

szag via AccessMonster.com

Thanks!
Requery the combo in the form current event:

If Not Me.Newrecord Then
Me.cbProjectPhase.Requery
End If
I have a form that includes a combobox that has the following in its on enter
event:
[quoted text clipped - 13 lines]
stores the bound information properly in the table but just doesn't show
correctly on the form. Any suggestions?
 

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