Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-16-2018, 09:58 AM   #1
murray83
sega collector
 
Join Date: Mar 2017
Location: Daventry, UK
Posts: 359
Thanks: 67
Thanked 0 Times in 0 Posts
murray83 is on a distinguished road
put picture on a report from path in a table

this is all back of the envelope coding

problem i have is i need to genereate a report which has a barcode on but we dont have barcode fonts (dont ask) so have used an online tool to generate them all and then have placed the path of each one in a table

so then when the report is run this is what i logical think and would like to happen

Code:
If Location = T_LocationBarcode!Location
AND IF BarcodePath Is Not Null THEN
img_Check_String_Barcode = BarcodePath
End if
but not sure if i would put this in report load or in the control source for the image

thanks for looking


EDIT

After some more searching on ol google i came across this

Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me![Imageframe].Picture = Me![Imagepath]
End Sub
i have replaced the [Imageframe] with my named picture frame and also changed the Me! after the equal to the name of my table

it dosent brake anything but then again dosent display anything either


Last edited by murray83; 11-16-2018 at 10:35 AM. Reason: more info found after more searching
murray83 is offline   Reply With Quote
Old 11-16-2018, 10:47 AM   #2
theDBguy
Newly Registered User
 
theDBguy's Avatar
 
Join Date: Oct 2018
Posts: 210
Thanks: 3
Thanked 33 Times in 32 Posts
theDBguy is on a distinguished road
Re: put picture on a report from path in a table

Hi,

How about rather than use code, try including the path to the image in the record source of your report and simply bind the image control to this field?

Hope it helps...
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 11-16-2018, 11:20 AM   #3
murray83
sega collector
 
Join Date: Mar 2017
Location: Daventry, UK
Posts: 359
Thanks: 67
Thanked 0 Times in 0 Posts
murray83 is on a distinguished road
Re: put picture on a report from path in a table

Quote:
Originally Posted by theDBguy View Post
Hi,

How about rather than use code, try including the path to the image in the record source of your report and simply bind the image control to this field?

Hope it helps...
its an option but i have more than one image so how would i differentiate on what is binded (bound even)

murray83 is offline   Reply With Quote
Old 11-16-2018, 11:25 AM   #4
murray83
sega collector
 
Join Date: Mar 2017
Location: Daventry, UK
Posts: 359
Thanks: 67
Thanked 0 Times in 0 Posts
murray83 is on a distinguished road
Re: put picture on a report from path in a table

for instance have tried this but i just have an empty image

Code:
Private Sub Report_Current()

If Me.txt_MULocation.Value = (DLookup("[Location]", "T_LocationBarcode", "[Location] =" & Forms![F_Main]!txtLocation)) Then
    Me.img_Check_String_Barcode.Picture = T_LocationBarcode!BarcodePath
Else
End If

End Sub
murray83 is offline   Reply With Quote
Old 11-16-2018, 11:27 AM   #5
theDBguy
Newly Registered User
 
theDBguy's Avatar
 
Join Date: Oct 2018
Posts: 210
Thanks: 3
Thanked 33 Times in 32 Posts
theDBguy is on a distinguished road
Re: put picture on a report from path in a table

If you add the path to the record source, then each record should display a different path, correct? If so, then when you bind an image control to this field, each record should display a different/matching image. Coding it is not really required anymore, since I believe Access 2010.

Hope it makes sense...
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 11-16-2018, 11:28 AM   #6
theDBguy
Newly Registered User
 
theDBguy's Avatar
 
Join Date: Oct 2018
Posts: 210
Thanks: 3
Thanked 33 Times in 32 Posts
theDBguy is on a distinguished road
Re: put picture on a report from path in a table

Quote:
Originally Posted by murray83 View Post
for instance have tried this but i just have an empty image

Code:
Private Sub Report_Current()

If Me.txt_MULocation.Value = (DLookup("[Location]", "T_LocationBarcode", "[Location] =" & Forms![F_Main]!txtLocation)) Then
    Me.img_Check_String_Barcode.Picture = T_LocationBarcode!BarcodePath
Else
End If

End Sub
Hi,

Like I was saying, donít try to use any code at all. You might find your life simpler if youíre able to achieve the same effect without using code.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 11-16-2018, 11:33 AM   #7
murray83
sega collector
 
Join Date: Mar 2017
Location: Daventry, UK
Posts: 359
Thanks: 67
Thanked 0 Times in 0 Posts
murray83 is on a distinguished road
Talking Re: put picture on a report from path in a table

hold the bloody phone i may have cracked the searching lark

just came across this page https://bytes.com/topic/access/answe...-access-report

and this snippet of code

Code:
Private Sub Report_Open(Cancel As Integer)
  Me![imgLogo].Picture = DLookup("[Path]", "tblLogo")
End Sub
and it works, it bloody works

well it displays the first image path so now just got to get to do some checking based on locations and make sure they both match

one happy camper

murray83 is offline   Reply With Quote
Old 11-16-2018, 11:37 AM   #8
theDBguy
Newly Registered User
 
theDBguy's Avatar
 
Join Date: Oct 2018
Posts: 210
Thanks: 3
Thanked 33 Times in 32 Posts
theDBguy is on a distinguished road
Re: put picture on a report from path in a table

Hi,

Congratulations. Glad to hear you are making some progress trying to use code. I just feel like you would have been done by now if had stopped trying to use code.

Good luck!

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Reply

Tags
dlookup , image , image path , report

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
path of picture in field sahh1419 General 1 01-13-2017 10:14 PM
display a picture from 1-table on a form/report wmsmith.it Forms 1 02-13-2014 03:22 PM
Picture in Report srikanthpai007 Reports 2 08-10-2009 06:58 AM
Picture with clipping path on form. Fuga Forms 0 08-07-2006 12:48 PM
[SOLVED] picture in report Ring Reports 0 09-08-2002 11:54 AM




All times are GMT -8. The time now is 11:55 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World