fields in report header

  • Thread starter Thread starter Joseph Atie
  • Start date Start date
J

Joseph Atie

Can you display data fields in a report header???

Im trying to do so with just a simple text field, but the
field prints out blank.

basicly i want to do something similar to concatenating
strings, i just want to say this is project:... and use a
value form the database to name the report.

I know i can do it with scripting, but this way seems so
much simpler
 
Yes.
If the value you want is in the first record of the report's RecordSource,
you could just bind the control to that field.

If it's in another table, use DLookup() to retrieve the value. More info:
http://members.iinet.net.au/~allenbrowne/casu-07.html

If you want to show the name of the database, set the Control Source of your
text box to:
=CurrentDb().Name
 
if by bind to a field, you mean set the controlsource
field in properties, that is already done and it still
fails to print out???

basicly i designed the form with all the fields that i
wanted, then just draged the relavent field into the
report header, it seemed to work fine til i tried to
print it.

*wonders if this is a message mdoerated forum* i.e if you
will see this reply
 
Yes we are talking about the Control Source of the text box.
You should be able to set the Control Source of the text box to an
expression such as:
="The client's name is " & [Surname] & "."
If the first client in the report is Joe Smith, the report header will show:
The client's name is Smith.

If that returns #Error, the expression is incorrect, or you need to change
the Name property of the text box. (If cannot be called Surname or any other
name that is the same as a field in the report's Record Source.)

If it is completely blank, there may be a blank row in table/query that the
report is based on? Or perhaps the Visible property of the text box or
report header is set to No?

If it works in preview but fails to print, there may be some issue with the
printer driver, or perhaps there is some code affecting the content or
visibility of the control or section.

Yes, Microsoft does moderate this newsgroup. Your message might be removed
if it is spam or libel for example, but your Access question and follow up
are very welcome.
 
Back
Top