djblois
djblois

Reputation: 805

Cannot refresh subform from other subform

I have a form that has multiple subforms on it. When someone changes a value in a combobox of one of the subforms it needs to refresh another subform. I am using this code but it doesn't work:

Forms!frmDispatchPlanningSheet!subfrmExtraDriversForPlanning.Form.Requery

I have even tried to remove the Record Source and re-add it. However, that also did not work.

When I am saying it doesn't work for the direct requery, I don't get an error; it just doesn't requery.

For the remove and re-add the Record Source, it does remove and re-add the source; however, it still doesn't refresh the query.

however, when I click in the other form and then hit refresh all in the Ribbon, it will refresh (so I know the query works).

What am I doing wrong? how do I fix this?

Upvotes: 2

Views: 186

Answers (1)

Andre
Andre

Reputation: 27634

If subfrmExtraDriversForPlanning refers to Driver via the table, you need to save the record first.

Add

Me.Dirty = False

before doing the .Requery.

Upvotes: 1

Related Questions