[AccessD] Invalid Reference to the Property Form/Report

Susan Geller sgeller at cce.umn.edu
Mon Jul 28 13:14:35 CDT 2003


frmWiz is open.  If that were the problem it would be a problem on all
computers, but I did triple check it anyway.

--Susan


-----Original Message-----
From: Brett Barabash [mailto:BBarabash at TappeConstruction.com] 
Sent: Monday, July 28, 2003 11:38 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Invalid Reference to the Property Form/Report


Susan,
Try adding a .Form property to the Subform control reference:

  Set ctl = Forms!frmWiz!SubCrit.Form!lstTerm

Older versions of Access required it.  A2K and newer shouldn't, but who
knows? BTW, the frmWiz is open when you print the report, right?


-----Original Message-----
From: Susan Geller [mailto:sgeller at cce.umn.edu]
Sent: Monday, July 28, 2003 11: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

------------------------------------------------------------------------
--------------------------------------------
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the
originator of the message. This footer also confirms that this email
message has been scanned for the presence of computer viruses.

Any views expressed in this message are those of the individual sender,
except where the sender specifies and with authority, states them to be
the views of Tappe Construction Co.

Scanning of this message and addition of this footer is performed by
SurfControl E-mail Filter software in conjunction with 
virus detection software.

_______________________________________________
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