Referencing to a field not shown in a Report

J

JohnB

Hi. I cant find any other posts on this subject, although I though it would
be a common question.

The following On Format code sets the height of a text box based on the
contents of field YearGroup. Both fields are bound to text boxes shown on
the report. How could I reference the YearGroup field if it was in the
reports control source SQL but was not shown as a text field in the report?
Does it matter if the control source is a separate, named, query? The field
YearGroup is in table tblStudents.

If Me!YearGroup = "Yr2" Then
Me!Text40.Height = 5760
End If

Thanks in advance. JohnB
 
B

Bob Howard

I've never been successful at doing it. I simply created a control on the
report and set Visible=No so the data would be present for me.
 
J

JohnB

Thanks Bob.

Yes, that's what I've been doing too but surely there is a more elegant way?

Cheers, JohnB
 

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