INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Image on Report using a DLookUp

Image on Report using a DLookUp

(OP)
I used to embed a logo on the report letterhead. But I decided to make it dynamic in case I have a 2nd Store front which
would use a different logo on the report letterhead.

In the image box on the report, on the 'picture' line, I took out the reference to the old embedded logo.
I went up to the blank Control source line and put in :
=Space(0) & DLookUp("[Logo1]","QryStorePick","[StoreID]=[forms]![frm5035Reports]![cboStoreID]")

I have a table tblStore which has a field name Logo1 that contains the Bitmap. I used bmp.

On a form frm5035Reports, i select a few things, including which Store i am using for the next letter.

I thought the dlookup above would do the job and give me a different logo depending on what
StoreID that i picked in frm5035Reports. I only get a blank Logo when i print preview the letter.

What am I doing wrong? Thanks.

RE: Image on Report using a DLookUp

Dlookup() won't return an image. Store the path to the image and use code to set the picture property of an image control.

Duane
Hook'D on Access
MS Access MVP

RE: Image on Report using a DLookUp

Quote:

use code to set the picture property of an image control.
Since 2007 there is absolutely no reason to use code anymore. Use a bound image control, save the path, and you are done.

RE: Image on Report using a DLookUp

(OP)
Maj: Yes, I knew somewhat about that. I thought I invented something, ha. Guess not.
In my other situation, I used a bound image control like you said.
I am having trouble connecting my 3 or 4 tables on this one.
Maybe I need to go thru my tables again and try to get the Logo1 field to talk with
the other tables. Thanks to you and Duane, I know now to abandon my dlookup method to get the picture.

RE: Image on Report using a DLookUp

Sorry, I was not clear. You do not have to add the field to your query. Make the logo a subform and use a bound image control. Store the image path as a field in your "settings" table.

RE: Image on Report using a DLookUp

However, I do think (untested) you can actually use a dlookup as a control source and returning the path and using a bound image control

RE: Image on Report using a DLookUp

(OP)
I redesigned my qry. Glad I did, thanks. I am back to having the bmp image stored in a table field.
I did away with the dlookup and fixed my qry.

There is something that i don't follow. I would like to avoid putting the true path of the image since my
friend seems to crash her computer alot and gets new ones, and files are lost or put in different places.

Whereas, if i can store the image in a table, it would stay in the Access file.
I seemingly get the images field into the query. But when i am on report, and i refer to the image,
I made a box on the report that the property sheet says .... selection type: IMAGE.
The name is image295. i tried to use the control source linge as LOGO1 which is a field in the query.

I am hoping that i do not need to make a Path. I am hoping that an image inside a query field will
allow a report to use it somehow ? If it can, HOW ?

Thanks alot.

RE: Image on Report using a DLookUp

(OP)
6/4/14 I'm still trying to figure out how to get my Report logo field to use the logo field in the qry.

The qry has just the desired one record that has the necessary report fields.
One of the fields is called Logo1.

In the report, I have an image box. I have the Control Source as Logo1.
(I am trying to avoid using specific directory code.)

The picture type says Embedded and the Picture says none.

Did I put myself on a goose chase? Can i get the logo work without stating a path ?
I would like the logo to be Inside the Access file. I don't have many pics to worry about size.

Can you advise? Thanks. If you would like a sample to test, i can make one.
I will let MajP say if it is OK or not.

RE: Image on Report using a DLookUp

(OP)
I figured out my last need. In order to get the table field Logo1 to appear in my report,I had to do the following:

1 - I opened the report in design view.
2 - In the Design tab, in the Tools group, click Add Existing Fields. I had been copying an
existing field and that was my mistake i guess. So i hit the existing fields button which
and dragged it to my report.
3 - took off the label.
4 - finally, i right clicked on the new field and in properties, border style, i made it transparent.

Probably sounds basic to you.
But I didn't know to hit the Add Existing field button.
I tried to do manually and couldn't get it to work for some reason.
Now it works. thanks

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close