You can't assign a value to this object. (1 Viewer)

doco

Power User
Local time
Today, 15:26
Joined
Feb 14, 2007
Messages
482
Using MS Access 2013

Code:
    Me.txtGrzAccts.Value = vGrz
    Me.txtTbrAccts.Value = vTbr

These two statements are embedded in a bit of vb in the Report_Load event.
The attempt to add values to those fields (located in the Report Footer) create the subject error.

Oddly, if opening the report in design mode then activating the report from there, the code works as expected. But opening the report directly creates the error.

The two variables are initialized from RS.Fields().Value attribute of a DAO.Recordset object.

TIA
 

llkhoutx

Registered User.
Local time
Today, 17:26
Joined
Feb 26, 2001
Messages
4,018
You probably have the code in the wrong event.

In what section of the report are those controls?
 

doco

Power User
Local time
Today, 15:26
Joined
Feb 14, 2007
Messages
482
As mentioned the text box is in the report footer. I have tested the code in the open, load and activate events. All with the same result.
 

Users who are viewing this thread

Top Bottom