[AccessD] Invalid Reference to the Property Form/Report

Susan Geller sgeller at cce.umn.edu
Wed Jul 30 14:09:08 CDT 2003


Hmmm, just tried that and it didn't work.  But, I reverted to an old
copy that is working so I'm okay, just still curious.

-----Original Message-----
From: Jim Lawrence (AccessD) [mailto:accessd at shaw.ca] 
Sent: Monday, July 28, 2003 11:58 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Invalid Reference to the Property Form/Report


Hi Susan:

I had a similar issue not so long ago and it was resolved by dim-ming
the object to public.

Public ctl As Control

HTH
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Susan Geller
Sent: Monday, July 28, 2003 8:48 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Invalid Reference to the Property Form/Report


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


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list