Cannot read fields in VB

J

Joel

I have a report that was originally written for an ADO application, but
which I have now converted to DAO in Access 2000. I am trying to
programmatically fill in boxes on each page of a multiply grouped report.
Some of the fields from the underlying query do not appear to be visible to
VB in a Detail Format event. This worked previously in the ADO version.

I am totally confused as to why some fields are visible and accessable, but
some are not. The ones that are not visible all appear to be from one
particular table.

TIA
Joel
 
D

Duane Hookom

If I understand correctly, you must bind your fields to controls in the
report in order to grab their values.
 
M

Marshall Barton

Joel said:
I have a report that was originally written for an ADO application, but
which I have now converted to DAO in Access 2000. I am trying to
programmatically fill in boxes on each page of a multiply grouped report.
Some of the fields from the underlying query do not appear to be visible to
VB in a Detail Format event. This worked previously in the ADO version.

I am totally confused as to why some fields are visible and accessable, but
some are not. The ones that are not visible all appear to be from one
particular table.

Make sure that the fields are included in the report's
record source query. How's that for stating the obvious.

A more subtle issue is that the field values are not
available to VBA code unless they are referenced in a
control somewhere in the report (it's an optimization
thing).

I don't know from ADO so I can't say why it used to work.
 

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

Top