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

Best way to set company details in report dynamically 1

Status
Not open for further replies.

Pampers

Technical User
Apr 7, 2004
1,300
AN
Hi Everyone,
I'm trying how to set someones company information in a report dynamically. Say, if you have a companies address in your report headers, and the company changes its address, you only want to change it once (in a table).

I use DLookup now to retrieve such company info for a report. But I was just wondering if there is another (prefered) way of doing this...

Pampers [afro]
Keeping it simple can be complicated
 
I would attempt to place the table in the report's record source query. This allows you to set control sources without using the inefficient DLookup() function.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Tnx for the reply. Yeah, I could do that. And you would also set the company logo that way?

Pampers [afro]
Keeping it simple can be complicated
 
I would expect the company table would have a field that contained the location of the image file. If you have the company table in the record source, you can set the picture property of the image control in the report.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanx dhookom,
That is indeed the way it setup. Using the company info in the queries of the report works fine; faster then the Dlookups, and also easier to control the output....



Pampers [afro]
Keeping it simple can be complicated
 
This works as long as there is only one record in the company table or you filter the results to a single company record.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top