Header info from non-linked table

P

Patrick

I have a report that I want to add a header. The header info comes from a
table other than the tbale that supplies data to the report. How do I do
that?
 
M

Marshall Barton

Patrick said:
I have a report that I want to add a header. The header info comes from a
table other than the tbale that supplies data to the report. How do I do
that?


You can use DLookup in a text box expression to retrieve a
value from the other table:
=DLookup("[header field]", "other table")
 
G

gDareos

Thanks, Marshall. I was lurking, and this morning, this post of yours
saved my hide :)

Thanks very much for sharing the usefulness of dLookup in providing a
report header(actually up to five lines of headers for me).

I appreciate it!!

Patrick said:
I have a report that I want to add a header. The header info comes from a
table other than the tbale that supplies data to the report. How do I do
that?


You can use DLookup in a text box expression to retrieve a
value from the other table:
=DLookup("[header field]", "other table")
 
M

Marshall Barton

Hey, it's a twofer ;-)

If you have more than just a couple of fields to lookup, it
would be more efficient to use code to open a recordset and
retrieve/set all the values once.
--
Marsh
MVP [MS Access]

Thanks, Marshall. I was lurking, and this morning, this post of yours
saved my hide :)

Thanks very much for sharing the usefulness of dLookup in providing a
report header(actually up to five lines of headers for me).

I appreciate it!!

Patrick said:
I have a report that I want to add a header. The header info comes from a
table other than the tbale that supplies data to the report. How do I do
that?


You can use DLookup in a text box expression to retrieve a
value from the other table:
=DLookup("[header field]", "other table")
 

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