Don't know how to add a member to a report object.

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

I inherited the maintenance of an Access 97 report. The VBA that
executes OnOpen of the report clears all records from a certain table,
computes a bunch of values, and writes them to the table. The data
displayed in the report is from this table.

I added a new field to the table, then added a line of code that writes
a value to a new element of the table. When I did this, I was able to
display this on field on the report.

Then I decided to add an additional field to the table, so I repeated
what I did before. The new field in the table gets populated with the
correct value, but I can't get it to display on the report.

In design view of the report, I see that the record source for the
report is the name of the report (I was surprised by this, I expected
that it would be the table that is created by the report). Using the
object browser, I can see why my second added field can't get
displayed- it is not a member of the report object. But the first
field that I added is a member!

I don't know what I did to get the first field that I added to be a
member of the report. But now I need to get the second field added as
a member. Can anyone help me figure out how to do this?

Thanks in advance.
 
Michael said:
I inherited the maintenance of an Access 97 report. The VBA that
executes OnOpen of the report clears all records from a certain table,
computes a bunch of values, and writes them to the table. The data
displayed in the report is from this table.

I added a new field to the table, then added a line of code that writes
a value to a new element of the table. When I did this, I was able to
display this on field on the report.

Then I decided to add an additional field to the table, so I repeated
what I did before. The new field in the table gets populated with the
correct value, but I can't get it to display on the report.

In design view of the report, I see that the record source for the
report is the name of the report (I was surprised by this, I expected
that it would be the table that is created by the report). Using the
object browser, I can see why my second added field can't get
displayed- it is not a member of the report object. But the first
field that I added is a member!

I don't know what I did to get the first field that I added to be a
member of the report. But now I need to get the second field added as
a member. Can anyone help me figure out how to do this?

Thanks in advance.

Never mind. I'm an idiot. The record source was not the report, it
was a query that was named identical to the report. I forgot that I
had added the first field to the query, but not the second field. Hope
nobody wasted time even reading this one. Sorry.
 

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