Refresh ComboBox Query
Posted on 2006-07-22
This is a general scenario that I use in several different places in my DB, with multiple types of linked records.
I've got a Form "Main" with subform "LinkedRecords" with a combobox "LinkedRecordsCodes". The source for the combobox is a query on a table "LinkedRecords". I've got another form where I can add records to "LinkedRecords". (The subform just provides a brief listing of what the linked records are...it's source is the many to many relationship table between Main and LinkedRecords).
When I add a record to "LinkedRecords", and then go back to "Main" and attempt to add the "LinkedRecord" in the "LinkedRecord" subform via the combobox, the newly added record doesn't show up in the combobox.
Clearly, I've got to refresh or requery the combo box, but I don't know which, and I don't know which event to use.
I don't want to requery Main because I want it to stay pointed to the record I'm working on.
Any suggestions would be appreciated.