Combo box re-query problem

Sammy B

Registered User.
Local time
Today, 15:02
Joined
Oct 31, 2005
Messages
97
I have a form with an unbound combo box that uses a query to look up values in a table. On the same form I have the same table as a subform. When I initially open the form and add a new entry to the subform it does show in the combo box. But if I open the combo box first to look at the list first and then add an entry to the subform the combo box will not list the new entry until I close the form and then re-open it. I have tried to re-query the combo box as an event on the subform but no luck. I even tried to re-query the combo box when it had focus.. No luck.

Does anyone have any ideas?

Thanks
Sam
:(
 
Use:

Private Sub YoucomboBox_AfterUpdate()
Me.Requery
End Sub

Or:

Private Sub YoucomboBox_AfterUpdate()
Forms!YouForm!YouSubform.Form.Requery
End Sub
 
Thanks but I had already tried that. Does not work.

I will keep trying.

Sam
 
I attached a simple version of my problem in MS Access 2003 format. If you open the 'Test' form you will see 2 controls. One is the 'Groups' subform and the other is a Combo box that looks up the group name. They are not connected. If I look in the combo box I see x number of entries. If I then go add another record to the subform it does not appear in the Combo Box until I close the form and reopen it.

Thanks
Sam
 

Attachments

Users who are viewing this thread

Back
Top Bottom