Hi. I've got a form, in the that form I have a combo box that is filled by
some data that exists in a table. I n that form I also have a button, and any
time I need a value in that combo I press the button and another form will
open, the previous form is not to be closed. In the form that just open I
insert the new value that does to the table that have that data that fill tha
combobox. Everything is fine, till the moment I close the new formand return
to the previous. In this form, that contains the combox, whem I expand the
combobox the new value is not listed.
I know that is a simple thing to do, I don't know. Can somebody help me?
Regards,
Marco
RichardP - 28 Sep 2006 12:15 GMT
Hi Marco,
When you return to the 'previous' form, execute the 'Requery' method of the
combo, e.g.
DoCmd.OpenForm "frmNewComboValue", WindowMode:=acDialog
Me.cboMyCombo.Requery
HTH
Richard
>Hi. I've got a form, in the that form I have a combo box that is filled by
>some data that exists in a table. I n that form I also have a button, and any
[quoted text clipped - 9 lines]
>Regards,
>Marco
Svetlana - 28 Sep 2006 14:29 GMT
On gotfocus event of your combo put this Me.NameOfCombo.Requery
RichardP - 28 Sep 2006 15:09 GMT
You want the combo requeried every time it gets focus? <shudder>
>On gotfocus event of your combo put this Me.NameOfCombo.Requery
Brandon Johnson - 28 Sep 2006 14:57 GMT
Marco,
You have to reestablish the recordset on the combobox. Did you fill the
combobox by code or through the properties window>rowsource?
-Brandon
> Hi. I've got a form, in the that form I have a combo box that is filled by
> some data that exists in a table. I n that form I also have a button, and any
[quoted text clipped - 9 lines]
> Regards,
> Marco