Populating Fields at Runtime

  • Thread starter Thread starter Jeff Harbin
  • Start date Start date
J

Jeff Harbin

I've got a report generated from a specific table. The report has a lot
of fields that are calculated from basic data that is stored in the
tables. I do not want to store the results of these calculations in a
table and thought I could generate them at run time.

When I open the report that has a subroutine in the Detail_OnFormat
event that is very basic (I'll make it more advanced once I prove out
the concept..) that assigns a value to three of the named calculated fields.

Me.Field1 = 2
Me.Field2 = 13
Me.Field3 = 7

I get an error message...

"You cannot assign a value to this object."

when I debug it brings me to the first line of the simple code.

Help...
 
You stated "assigns a value to three of the named calculated fields" which
doesn't make sense. First, the "fields" are probably text boxes. Second
"calculations" suggests they are bound to an expression. You can only assign
a value if the text box has no control source.
 
Could you provide your actual code (or a snippet)? You suggest they are "not
bound to any field". Does this also include any combination of fields or
other expressions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top