D
Dennis Snelgrove
I've got a form called "frmMainForm" with a subform called
"chldCashDistribution". I'm trying to change the recordset to one of
two different queries, based on the value of a control on the main
form. I've tried referencing the RecordSource like this:
If chkGenerated = False Then
Form_frmMainForm.chldCashDistribution.Form.RecordSource =
"qryCashDistribution"
Else
Form_frmMainForm.chldCashDistribution.Form.RecordSource =
"qryCashDistributionSummary"
End If
but I keep getting the following error:
Run-time Error #2455: You entered an expression that has an invalid
reference to the property Form/Report.
What am I doing wrong?
Thanks for any help...
"chldCashDistribution". I'm trying to change the recordset to one of
two different queries, based on the value of a control on the main
form. I've tried referencing the RecordSource like this:
If chkGenerated = False Then
Form_frmMainForm.chldCashDistribution.Form.RecordSource =
"qryCashDistribution"
Else
Form_frmMainForm.chldCashDistribution.Form.RecordSource =
"qryCashDistributionSummary"
End If
but I keep getting the following error:
Run-time Error #2455: You entered an expression that has an invalid
reference to the property Form/Report.
What am I doing wrong?
Thanks for any help...