473,397 Members | 1,950 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,397 software developers and data experts.

image in report in access

6
Hi there i got recommended to this site by a mate who is doing an A-level project, as am I! i was wondering if anyone knows a simple way of putting a picture box in a report which displays the contents of a text book with the file path i.e i want the picture box to display
Expand|Select|Wrap|Line Numbers
  1. CurrentProject.Path & txtImageLocation
i have tried and tried to get this to work but for some reason im not given many options with an image box in a report, I dont understand unboun/ bound objects and am not sure whether this can help!!

thanks in advance for any help

johnny ward
Feb 28 '07 #1
13 2161
ADezii
8,834 Expert 8TB
Hi there i got recommended to this site by a mate who is doing an A-level project, as am I! i was wondering if anyone knows a simple way of putting a picture box in a report which displays the contents of a text book with the file path i.e i want the picture box to display
Expand|Select|Wrap|Line Numbers
  1. CurrentProject.Path & txtImageLocation
i have tried and tried to get this to work but for some reason im not given many options with an image box in a report, I dont understand unboun/ bound objects and am not sure whether this can help!!

thanks in advance for any help

johnny ward
In the Open Event of your Report:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Report_Open(Cancel As Integer)
  2.   Me![imgTest].Picture = "C:\Test\Test.bmp"
  3. End Sub
NOTE: CurrentProject.Path does not return the trailing backslash, you may have to add it to your Path e.g.
C:\Documents and Settings\security\My Documents
Feb 28 '07 #2
kojo88
6
In the Open Event of your Report:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Report_Open(Cancel As Integer)
  2.   Me![imgTest].Picture = "C:\Test\Test.bmp"
  3. End Sub
NOTE: CurrentProject.Path does not return the trailing backslash, you may have to add it to your Path e.g.
C:\Documents and Settings\security\My Documents

I now have a run-time error 2427 and message:"You entered an expression that has no value"

HELP!!!
Mar 1 '07 #3
Rabbit
12,516 Expert Mod 8TB
Did you change [imgtest] to the name of your control?
Mar 1 '07 #4
kojo88
6
yes i changed it to picImage which is my image box
Mar 1 '07 #5
Rabbit
12,516 Expert Mod 8TB
Try:
Expand|Select|Wrap|Line Numbers
  1. Me!Image1.Properties("Picture") = "C:\Test\Test.bmp"
Mar 1 '07 #6
kojo88
6
im getting same error!!!:(

somehow i think reports dont like picture boxes and stuff cos it wont give me functionality with command buttons either
Mar 2 '07 #7
Rabbit
12,516 Expert Mod 8TB
That's weird cause I tried it and it works for me.
Mar 2 '07 #8
NeoPa
32,556 Expert Mod 16PB
im getting same error!!!:(

somehow i think reports dont like picture boxes and stuff cos it wont give me functionality with command buttons either
Did you change the file reference to refer to your picture? And how?
Can you post the code you're actually using.
Mar 3 '07 #9
kojo88
6
Expand|Select|Wrap|Line Numbers
  1.     picImage.Visible = True
  2.     picImage.Picture = CurrentProject.Path & txtImageLocation
  3.     cmdShowImage.Caption = "Hide Image"
  4.  
this is my code for how it works in a form, so why cant this work in a report?
Mar 23 '07 #10
NeoPa
32,556 Expert Mod 16PB
The request for the code was only the second sentence :(
If you ignore the questions of the experts here, how do you expect us to help you?
Mar 23 '07 #11
NeoPa
32,556 Expert Mod 16PB
I did notice in your code, though, that you don't add a '\' after the Path. The Path does NOT include a trailing '\' so this may be your problem (or maybe just one of them).
Expand|Select|Wrap|Line Numbers
  1. picImage.Picture = CurrentProject.Path & txtImageLocation
Mar 23 '07 #12
kojo88
6
thanks for your help, sorry it takes long to reply i am at college near enough 24/7 studying etc., so its difficult to get a spare minute to check up on the many forums i use
Mar 29 '07 #13
NeoPa
32,556 Expert Mod 16PB
No problem Kojo.
As it's a forum, we don't expect immediate responses. Any time you post we can see that and respond appropriately.
Pleased to hear it's helped anyway :)
Mar 29 '07 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ed Landau | last post by:
In VB6.0, I can put an image on a form and assign it's .picture property at run-time. In VBA (within MS Access), when I put down an image control on a form, it asks me for the source to the image...
3
by: Veetold | last post by:
I have a problem with displaying image files (jpg) on my report. I got a solution from Larry Linson (Microsoft Access MVP) for which I'm grateful, but I still don't exactly know how to link an...
1
by: Veetold | last post by:
The solution you suggested works very good - thanks again. I encountered a new problem related to this topic. According to your advise I put the following line to print and format event: ...
6
by: Roger | last post by:
I have a report with a image displaying our company logo if I create an snapshot of this report, it appears to create an 'snp' file, but nothing is stored in the folder I tried both linked and...
1
by: Jason | last post by:
For some reason, most but not all reports printing from an access application our client is using will not print any images on the reports or forms. One report will print the image and data...
3
by: kathyk | last post by:
Hi All, I am using Access 2003 on machines with windows 2000 and XP. The problem I'm having started only after we got a new image for our PC's. This database app has been around for awhile and...
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,...
7
by: needin4mation | last post by:
Hi, I have an Access 2002 - 2003 database. I am using Access 2003. Whenever I link an image all it shows is the filename. Not the image. Other versions of Access can link the image just fine. ...
4
by: chrisse_2 | last post by:
Hey, Sorry about all the image posts its just that i need to get this to work!!! - I've already posted about the CanShrink and CanGrow option for image controls. This is a no go! What if i...
1
by: urange | last post by:
Hi to all, I am setting up a database which has to store a great number of images. I will therefore store the images not as OLE but as a text link to the file (maybe I'll try the BLOB-solution)....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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.