Hello all,
I am new to MS Access. I have a form (e.g. frmA) bound to a table as its Record Source. It has a subform (e.g. subfrmB) inside. The Record Source of the subform is set to a select query which returns multiple results - something like
select dictinctrow a,b from tableX_JOIN_tableY
Inside this subform, I have placed a combobox called MyComboBox with its Row Source set to a different query:
select a,b from tableX
When I view the form, I see several comboboxes - one combobox for each row returned by the Record Source query of the subform. Here is the problem:
Sometimes a user would update the database using a web form and he or she will have the Access form open at the same time. This update creates a new record in both tables - tableX_JOIN_tableY and in tableX. Both of the select queries above are supposed to return the new record. When the user opens the Access subform, they expect to see a new combobox with the new record they have just added through the web form. Instead, they see a new blank combobox. The dropdown list of the combobox does not include the new record. The only way to work around this is to close the main form and open it again. Then, the combobox that used to be blank DOES show the new record.
I was wondering if there is a way to force and update of the combobox dropdown lists. I tried all of this in the "On Current" event of the main form (frmA):
[Me]![forms]![frmA]![subfrmB]!Requery
[forms]![frmA]![subfrmB]!Requery
Me.subfrmB.Requery
Me.subfrmB.Form.Requery
Nothing seems to work. Do you have any ideas how to refresh the combobox drop-down lists? Thank you in advance!