473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

filling picture on report

Thanks anyone in advance... I have a product report that prints out
data about the product including a picture... at least that's what I
need to happen. On my report I have a linked Image with the two sets
of code that I've tried without any luck:

Note: on my form I have a TextBox named ImagePath that reads my image
path:
="\\MainServer\data\companyInventory\" & [Forms]![ProductForm]!
[ImagePathName] & "

on my report I've tried these two code blocks on the OnOpen event:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Picture = [Forms]![ProductForm]![ImagePath]
End Sub

and also:

Private Sub Report_Open(Cancel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Picture = [Forms]![ProductForm]![ImagePath]
End Sub

Any clues to the above or general "How To" on getting a Product Name
put into a textbox and the report reading the Product Name an getting
into the Report (?)

Thanks! Dav

Mar 5 '07 #1
3 1760
On Mar 4, 9:55 pm, "Parasyke" <kress1963no...@yahoo.comwrote:
Thanks anyone in advance... I have a product report that prints out
data about the product including a picture... at least that's what I
need to happen. On my report I have a linked Image with the two sets
of code that I've tried without any luck:

Note: on my form I have a TextBox named ImagePath that reads my image
path:
="\\MainServer\data\companyInventory\" & [Forms]![ProductForm]!
[ImagePathName] & "

on my report I've tried these two code blocks on the OnOpen event:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Picture = [Forms]![ProductForm]![ImagePath]
End Sub

and also:

Private Sub Report_Open(Cancel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Picture = [Forms]![ProductForm]![ImagePath]
End Sub

Any clues to the above or general "How To" on getting a Product Name
put into a textbox and the report reading the Product Name an getting
into the Report (?)

Thanks! Dav

You haven't indicated what is wrong. Are you getting an error message?
Image just not displaying?
="\\MainServer\data\companyInventory\" & [Forms]![ProductForm]!
[ImagePathName] & "
What is [ImagePathName]? Just file name or a longer path? Remove the &
" at the end.

Mar 5 '07 #2
On Mar 5, 8:42 am, "storrboy" <storr...@sympatico.cawrote:
On Mar 4, 9:55 pm, "Parasyke" <kress1963no...@yahoo.comwrote:


Thanks anyone in advance... I have a product report that prints out
data about the product including a picture... at least that's what I
need to happen. On my report I have a linked Image with the two sets
of code that I've tried without any luck:
Note: on my form I have a TextBox named ImagePath that reads my image
path:
="\\MainServer\data\companyInventory\" & [Forms]![ProductForm]!
[ImagePathName] & "
on my report I've tried these two code blocks on the OnOpen event:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Picture = [Forms]![ProductForm]![ImagePath]
End Sub
and also:
Private Sub Report_Open(Cancel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Picture = [Forms]![ProductForm]![ImagePath]
End Sub
Any clues to the above or general "How To" on getting a Product Name
put into a textbox and the report reading the Product Name an getting
into the Report (?)
Thanks!Dav

You haven't indicated what is wrong. Are you getting an error message?
Image just not displaying?
="\\MainServer\data\companyInventory\" & [Forms]![ProductForm]!
[ImagePathName] & "

What is [ImagePathName]? Just file name or a longer path? Remove the &
" at the end.- Hide quoted text -

- Show quoted text -
Error states that it can't find the picture file and then takes me to
the debug screen in VB.
ImagePathName is the name of the textbox on the form.

Mar 5 '07 #3
On Mar 5, 1:55 pm, "Parasyke" <kress1963no...@yahoo.comwrote:
On Mar 5, 8:42 am, "storrboy" <storr...@sympatico.cawrote:
On Mar 4, 9:55 pm, "Parasyke" <kress1963no...@yahoo.comwrote:
Thanks anyone in advance... I have a product report that prints out
data about the product including a picture... at least that's what I
need to happen. On my report I have a linked Image with the two sets
of code that I've tried without any luck:
Note: on my form I have a TextBox named ImagePath that reads my image
path:
="\\MainServer\data\companyInventory\" & [Forms]![ProductForm]!
[ImagePathName] & "
on my report I've tried these two code blocks on the OnOpen event:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Picture = [Forms]![ProductForm]![ImagePath]
End Sub
and also:
Private Sub Report_Open(Cancel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Picture = [Forms]![ProductForm]![ImagePath]
End Sub
Any clues to the above or general "How To" on getting a Product Name
put into a textbox and the report reading the Product Name an getting
into the Report (?)
Thanks!Dav
You haven't indicated what is wrong. Are you getting an error message?
Image just not displaying?
="\\MainServer\data\companyInventory\" & [Forms]![ProductForm]!
[ImagePathName] & "
What is [ImagePathName]? Just file name or a longer path? Remove the &
" at the end.- Hide quoted text -
- Show quoted text -

Error states that it can't find the picture file and then takes me to
the debug screen in VB.
ImagePathName is the name of the textbox on the form.

This tells me a couple things...

1) You don't have error trapping in the code. This is why the code
window opens in debug mode. You should add some so that when a file in
not accessible (and there are a lot of reasons in a network
environment). A more appropriate message is displayed and the users
aren't prompted to view the code that caused it.
2) The filepath is invaid. Either in spelling, the way you've spliced
them together, or access across the network is denied in some fashion.
At some point in the code before you try to apply the image to the
control, add a line...

Debug.Print [Forms]![ProductForm]![ImagePath]

and post the result to see if the formatting is correct. At the same
time, make sure this path is real and accessible on the network.

Mar 5 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sandra Lambrechts | last post by:
We are using Crystal Report .Net to create our reports. We have inserted a picture on the Crystal Report, but when we export the report to a pdf-file to print the report, the quallity of our...
2
by: Sam | last post by:
Hello everyone, I have a table, which contains a picture column, I put URL info into it. "www.myweb.com/1.jpg..." I want to show this picture in my crystal report, I find some samples show the...
1
by: Filips Benoit | last post by:
Dear All, I want a report for a list of products with its picture on the leftsite of the Productname and the P-price. So 3 controls in the detail-section: image (unbound, hight=5cm), P-name and...
2
by: Regnab | last post by:
I've got a YES/NO section of a report I'm making. Depending on certain values, I want to circle either YES or NO. I've got the code working so it'll show or hide the circle, but I can't seem to get...
6
by: Salad | last post by:
Hi: I have a Bill of Lading template from the printer that I saved as a BMP. I created a new report and in the report's picture property told it the BMP file name. It brought the image in just...
1
by: Amr Moselhy | last post by:
Hi Everyone i m trying to create a crystal report that contains a picture and this picture differs according to certain database information . the name of the picture to be included in the report...
4
by: NASAdude | last post by:
I'm working on distributing a database using VS Tools for Office, and am having trouble with linked images on forms/reports. The image objects have a default path\file set on the .Picture property,...
3
by: Parasyke | last post by:
I have a form that has a bound textbox displaying a picture path (in another folder) for an image (e.g. C:\Documents and Settings\My Documents\My Pictures\SymbolVRC 6940.jpg). I need this actual...
1
by: davidwelli | last post by:
Hello, I have a Access 200 format database that contains contact details and a picture for each record. The contact details are held in one table and the images are held in another as OLE...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.