Set a Subform Unbound Control controlsource from the Mainform (1 Viewer)

andy1968

Registered User.
Local time
Yesterday, 19:34
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.
 

Micron

AWF VIP
Local time
Yesterday, 22:34
Joined
Oct 20, 2018
Messages
3,478
Try it without the "controlsource" part. With that, you are trying to set a property, not a value, yet you're passing a value.
 

andy1968

Registered User.
Local time
Yesterday, 19:34
Joined
May 9, 2018
Messages
131
Thanks Micron!

It seems I was over thinking this.
 

Micron

AWF VIP
Local time
Yesterday, 22:34
Joined
Oct 20, 2018
Messages
3,478
So that was it? Glad to have helped if it was.
 

Users who are viewing this thread

Top Bottom