Set a Subform Unbound Control controlsource from the Mainform

andy1968

Registered User.
Local time
Yesterday, 21:38
Joined
May 9, 2018
Messages
131
I want to set an unbound control on a subform based on a value in an unbound combo box on the mainform.

The mainform, frmRecallPayQuantities, has a combobox cmbMonth.

The subform, frmDailyReportQuantitiesSummary, has an unbound textbox in the forms footer called txtMonth.

I'm trying to use the afterupdate event for cmbMonth to set the control source for txtMonth.

I've tried:

Me.frmDailyReportQuantitiesSummary.Form.txtMonth.controlsource = "Totals for the month " & Me.cmbMonth

I get "#Name?" in the txtMonth field.

Been searching all morning for a solution.

Thanks.
 
Try it without the "controlsource" part. With that, you are trying to set a property, not a value, yet you're passing a value.
 
Thanks Micron!

It seems I was over thinking this.
 

Users who are viewing this thread

Back
Top Bottom