I have an access 2007 report that I an executing from a form, The report is based on a query that i change when it is execuded using me.recordsource =, There is a text box in the heading that i want to give a value to when the report is executed. The following line of vba code is what i tried but i get an error stateing "the control can't be referenced unless it has focus". when i try to set focus i get the error "ms office doesn't allow you to use this method in current view".
[Report_Associat e Location By Site-AM].txtLocation.Se tFocus
[Report_Associat e Location By Site-AM].txtLocation.Te xt = Form_Reporting. cmbLocation.Val ue
[Report_Associat e Location By Site-AM].txtLocation.Se tFocus
[Report_Associat e Location By Site-AM].txtLocation.Te xt = Form_Reporting. cmbLocation.Val ue
Comment