Requery a Combo Box List

B

Bob

I have a combo box in a Tabular Form which has a drop down box select, but
if I put the word Green in the list , the option to select it in the next
box doesn't show untill I close the form and open it again is there a way to
update it straight away........Thanx ....Bob
 
A

Arvin Meyer [MVP]

Use code like the following in the AfterUpdate event of the combo:

Private Sub MyCombo_AfterUpdate()
Me.NameOfComboToRequery.Requery
End Sub
 
B

Bob

Thanks Arvin, But it is always one behind what ever I enter , so if I enter
green it does not show then I enter yellow , then go to next combo box it
shows green and not yellow, so then I enter red and go to next combo it now
shows yellow and not red
Thanks.....Bob
Private Sub cbSpelling_AfterUpdate()

Me.cbSpelling.Requery
End Sub
 
A

Arvin Meyer [MVP]

Private Sub MyCombo_AfterUpdate()
DoCmd.RunCommand acCmdSaveRecord
Me.NameOfComboToRequery.Requery
End Sub

It will only work if you've satisfied the necessary requirements for that
table. If you have no required fields, or those fields have defaults, it
will work fine.
 
Top