A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Use datafields as variable to display picture ?



 
 
Thread Tools Display Modes
  #1  
Old August 3rd, 2007, 09:30 AM posted to microsoft.public.access.reports
Sale
external usenet poster
 
Posts: 4
Default Use datafields as variable to display picture ?

I have a report with image control named IMAGE5 in which I wanna to
display a picture .
Path to the picture is stored in table IMAGE column PATH.

The code based on details format event is :

Option Compare Database
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Image5.Picture = Me![PATH]
End Sub

but it generates a run-time error - because of null values in Me!
[PATH] .
I have set Report Record Source=IMAGE ( table with column PATH that
stores paths to the image on disc )

How can be [PATH] empty ?

What is wrong !
Thanx, Sasa

  #2  
Old August 3rd, 2007, 03:34 PM posted to microsoft.public.access.reports
Carl Rapson
external usenet poster
 
Posts: 517
Default Use datafields as variable to display picture ?

"Sale" wrote in message
ps.com...
I have a report with image control named IMAGE5 in which I wanna to
display a picture .
Path to the picture is stored in table IMAGE column PATH.

The code based on details format event is :

Option Compare Database
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Image5.Picture = Me![PATH]
End Sub

but it generates a run-time error - because of null values in Me!
[PATH] .
I have set Report Record Source=IMAGE ( table with column PATH that
stores paths to the image on disc )

How can be [PATH] empty ?

What is wrong !
Thanx, Sasa


[PATH] can be empty if nothing was put into it. You'll need to check for an
empty path when setting the Picture property:

Me.Image5.Picture = Nz(Me![PATH],"")

Carl Rapson


  #3  
Old August 3rd, 2007, 07:20 PM posted to microsoft.public.access.reports
Sale
external usenet poster
 
Posts: 4
Default Use datafields as variable to display picture ?



[PATH] can be empty if nothing was put into it. You'll need to check for an
empty path when setting the Picture property:

Me.Image5.Picture = Nz(Me![PATH],"")

Carl Rapson


That is a problem, why [PATH] is empty???

I have set Record Source to look into IMAGE.PATH that include some
value ( path to the image on disc )...

  #4  
Old August 3rd, 2007, 07:54 PM posted to microsoft.public.access.reports
Carl Rapson
external usenet poster
 
Posts: 517
Default Use datafields as variable to display picture ?

"Sale" wrote in message
ups.com...


[PATH] can be empty if nothing was put into it. You'll need to check for
an
empty path when setting the Picture property:

Me.Image5.Picture = Nz(Me![PATH],"")

Carl Rapson


That is a problem, why [PATH] is empty???

I have set Record Source to look into IMAGE.PATH that include some
value ( path to the image on disc )...


Are you certain that every record in your IMAGE table contains an entry in
the PATH field? If you open the table, are any of the PATH entries blank?
Since I don't know how you are loading your records, I have no way of
knowing how a field could be empty.

Carl Rapson


  #5  
Old August 5th, 2007, 11:00 AM posted to microsoft.public.access.reports
Sale
external usenet poster
 
Posts: 4
Default Use datafields as variable to display picture ?

On 3 kol, 19:54, "Carl Rapson" wrote:
"Sale" wrote in message

ups.com...



[PATH] can beemptyif nothing was put into it. You'll need to check for
an
emptypathwhen setting the Picture property:


Me.Image5.Picture = Nz(Me![PATH],"")


Carl Rapson


That is a problem, why [PATH] isempty???


I have set Record Source to look into IMAGE.PATHthat include some
value (pathto the image on disc )...


Are you certain that every record in your IMAGE table contains an entry in
thePATHfield? If you open the table, are any of thePATHentries blank?
Since I don't know how you are loading your records, I have no way of
knowing how a field could beempty.

Carl Rapson


Here is answer : Are you certain that every record in your IMAGE table
contains an entry ....
I have some blank field ( I can't believe it .... ), after filling- it
works !

Thanx, Carl !!!!!

  #6  
Old August 6th, 2007, 08:36 PM posted to microsoft.public.access.reports
Carl Rapson
external usenet poster
 
Posts: 517
Default Use datafields as variable to display picture ?

"Sale" wrote in message
ups.com...
On 3 kol, 19:54, "Carl Rapson" wrote:
"Sale" wrote in message

ups.com...



[PATH] can beemptyif nothing was put into it. You'll need to check for
an
emptypathwhen setting the Picture property:


Me.Image5.Picture = Nz(Me![PATH],"")


Carl Rapson


That is a problem, why [PATH] isempty???


I have set Record Source to look into IMAGE.PATHthat include some
value (pathto the image on disc )...


Are you certain that every record in your IMAGE table contains an entry
in
thePATHfield? If you open the table, are any of thePATHentries blank?
Since I don't know how you are loading your records, I have no way of
knowing how a field could beempty.

Carl Rapson


Here is answer : Are you certain that every record in your IMAGE table
contains an entry ....
I have some blank field ( I can't believe it .... ), after filling- it
works !

Thanx, Carl !!!!!


Glad it worked, but that should indicate to you that it is important to test
for an empty path, even if you think it is filled. Things happen.

Carl Rapson


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:11 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.