I cannot find the control with that name on the form. Check to be sure you
spelled it corrrectly.
--
Dave Hargis, Microsoft Access MVP
"BruceF" wrote:
> I have a form that calls up a report. The form has a checkbox and if checked,
> changes the recordsource to QueryA. If unchecked, it changes the recordsource
> to QueryB.
>
> When I try to run the report, I get a run-time error of 2465 and the message
> says "Microsoft Office Access can't find the field 'chkBoxField' referred to
> in your expression".
>
> Below is my code:
> If Forms![frmMainMenu]![chkBoxField] = True Then
> Me.RecordSource = "QueryB"
> Else
> Me.RecordSource = "QueryA"
> End If
> Any ideas??
|