[AccessD] Invalid Reference to the Property Form/Report

Susan Geller sgeller at cce.umn.edu
Mon Jul 28 10:47:34 CDT 2003


I have an application and I'm testing the new release and suddenly
getting an error in a place where I did not get one in an older version.
And, I'm not getting it on the development machine, only on test
machines.  

On a report, in the Private Sub PageHeaderSection_Format code, I have:

Dim ctl As Control
Dim strDescr As String
Set ctl = Forms!frmWiz!SubCrit!lstTerm
strDescr = BuildReportHeaderString(ctl, 1)

The code runs fine when the report first opens in preview mode.  But,
when I try to preview page 2 or any subsequent pages, I get this
message:

"You entered an expression that has an invalid reference to the property
Form/Report".  When I step through the code, the error is in setting
ctl.  I tried getting rid of the ctl reference and instead used just:

strDescr = BuildReportHeaderString(Forms!frmWiz!subCrit!lstTerm, 1)

But I get the same error message at this line.  References are ADO 2.7
library.  

I am at a total loss.

--Susan






Susan B. Geller
Office of Information Systems
College of Continuing Education
University of Minnesota
306 Wesbrook Hall
77 Pleasant Street SE
Minneapolis, MN 55455
Phone:  612-626-4785
Fax:  612-625-2568




More information about the AccessD mailing list