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

Report header needs info from a table 1

Status
Not open for further replies.

cimoli

Technical User
Jul 30, 2010
207
US
I have 2 databases. The Qry, forms,reports are the same for both fellows. Their data differs.
In the reports header, I currently have each person's name and Rep Number as a text field.

I was thinking, why not have a table with a fellows repcode, his name, and whatever else i want.
And use a checkbox field on one of the table records to signify which fellows name etc should
appear on the report. I kind of prefer that than having a login process. This is small potatoes.

And make the report header or title look to the table for the info that i want to print in the report header.
the checkbox in the table being the record to choose.

Any tips? thanks
 
I was thinking, maybe a Dlookup in a text field in the report header to go look to tblRep and
look at a Y/N field in the table for whose name and repcode to use in the header.

What do you think?

I am not sure about the dlookup.

 
DLookup()s would work. I typically use a subreport bound to tblRep to display the information. That way you can update the subreport and it will automatically update the reports. You can also add tblRep to the report's record source and set a filter on the Y/N field in the table. Don't join tblRep to any other table and make sure it is filtered to only a single record.

Duane
Hook'D on Access
MS Access MVP
 
Thanks Duane. I went your Qry-form-subreport method and it works great. That was a neat tip as usual.
 
Duane - When i ran into a problem when I worked on my second existing report.
I copy pasted the subreport that I did in my first report, into my second report.
Into the report Page Header in both reports.

The first report works fine with your method. The subreport shows the Rep's name and phone number
in the overall report.

But I can't get the 2nd report to do it. When I copy pasted from 1st report,
it does not come into #2 report the same way. Just looks like a text box.

I can't figure out why.
 
Duane - In the words of Rosana Danna, "Never Mind."
When I got out completely of my file and came back in later,
the 2nd report was fine.

I had run it immediately after adding the subreport to report #2.
And it had not worked.

but i just went back in and it works great.

So again, thanks alot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top