[AccessD] Want to repopulate combo after adding items

Charlotte Foust charlotte.foust at gmail.com
Wed Sep 10 13:30:16 CDT 2014


Susan,

You need to use the Not In List event to add the item to the table, then
you can reset the rowsource of the combobox to get the updated list.

Charlotte

On Wed, Sep 10, 2014 at 8:45 AM, Susan Harkins <ssharkins at gmail.com> wrote:

> Setup -- I'm using a combo box to offer current species so the user can
> just select one instead of re-entering. If the species isn't available yet,
> there's a command button the user can click to enter the new species.
>
> The combo box is populated by a species lookup table.
>
> Using the combo box's Click event, I tried to requery the list as follows:
>
> Private Sub SpeciesIDFK_Click()
>     'Repopulate species combo after adding new species.
>     Me.Requery
> End Sub
>
> The popup form is entering the new species -- I've checked the underlying
> table and it's there. But, when I return to the main form and click the
> comb box's dropdown arrow to review the list again, the new species is not
> in the list.
>
> I dropped in a Debug.Print after the Requery method to at least let me know
> the event is firing and apparently it isn't.
>
> I went looking for a dropdown event and while there's lots about what it
> is, there is not a dropdown event in the Events dropdown in the VBE for the
> combo box control in question.
>
> Any help?
>
> Susan H.
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list