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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with an accessing a field from a subreport

Status
Not open for further replies.

DancingDon

Programmer
Dec 30, 2001
4
US
I have an unbound field in a sub report (Access 97) which is a sentence
composed of data from a bound field. I did this in VBA in onformat,
capturing and qualifying the data of each record and concantinating it
every time it loops. The phase comes out just fine in the report, but as a
sub report it goes bonkers.

Firstly, the sentence repeats itself twice. Secondly, if the sub report
visible property is set to no, the sentence doesn't even appear in a
linked field in the main report. I have the same result even if I leave it
visible but shrink the size of the sub report. I've tried moving code and
unbound field to various sections of the report but still to no avail. I am
currently using a convoluted method of opening and closing each of
several sub reports with similar construction and setting the setence to
a global variable but the screen flashes even though echo is set to false.

If someone has a clue I'd be grateful.
 
Are you binding the subreport by this unbound control or a bound control? The child field of the subreport control must be same value of the master field (thus bound).
 
Nancy2 Thanks for taking the time to respond. The sub reports are in fact bound. Any other thoughts you have are welcomed. DD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top