Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User defined fields using the VB code builder

Status
Not open for further replies.

l7square01

Programmer
Jun 4, 2004
5
US
I am new to ms access. I am trying to display a calculated value in a text box. The calculated field name is PageSum. In the ControlSource property I set it to: =[PageSum], but it appears that the PageSum variabe is not recognizable to the text box. The PageSum field is not in any database table, it is a field the I defined using the VB code builder.
 
If you are saying that Pagesum only exists in VBA code then you have to write code to put it into a textbox.

Probably the Print event procedure for the section where it appears.

me.txtPagesum = Pagesum

where txtPagesum is the name of the textbox to hold the total. Giving two things the same name is a route to heartache.

But this depends on how and wher you have defined the Pagesum variable.
 
You could just use the expression builder to create an expression to find your answer. Expression builder will not
show or recognize vb coded variables but does see the fields included in the recordset for the report and can sum, count, etc. the values. As you said [pagesum] is not a field or the result of a query expression (also another place where you could build an expression to find your answer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top