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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|