473,836 Members | 1,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to add image control

5 New Member

I've created on a form an event to create a new report. I've almost done but can't solve one problem with newly created image control in the report.

I have a source with image path but i couldn't find solution how to add this path info to the control.

Below is the part of my code. I receive error on 15th line: "Run-time error'438': object doesn't support this property or method". Please give some advises.

Expand|Select|Wrap|Line Numbers
  1. Dim txtPhotoID As Access.Image
  3. Set rpt = CreateReport
  4. strReportName = rpt.Name
  6. title = "Report1"
  7. DoCmd.RunCommand acCmdDesignView
  9. rpt.RecordSource = "SELECT ImagePathlink FROM test1;"
  11. Set txtPhotoID = CreateReportControl(rpt.Name, acImage, _
  12.          acGroupLevel2Header, , , 200, 200)
  13.          txtPhotoID.SizeToFit
  14.          txtPhotoID.Name = "CatgPhoto"
  15.          rpt.Controls("CatgPhoto").ControlSource = "ImagePathlink"
Mar 7 '12
10 12613
759 Contributor
Paukste !
Is how (and how I like) to learn myself: by analyze others code. It is why I provide you code and, finally, the database.
I can't understand why don't work for you.
Sorry for that.

If anyone else can make testes I'll thank he (she) very much.
Mar 16 '12 #11

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

Similar topics

by: Greg Christie | last post by:
I think I have a somewhat unique situation here, so I thought I should post it for the few poor souls who run across it and try to google it like I did. First of all, I was getting the following error when trying to hit one of my pages... --------------------------------------------------------------------- Invalid URI: There is an invalid sequence in the string. ---------------------------------------------------------------------
by: Arnold | last post by:
Hey there, I've browsed for some fixes to this but only found a couple of similar posts, which didn't solve my problem. I'm wondering how to refresh an image control in a form after a user clicks a cmd button to open the Windows API Common Dialog and selects a new file (jpeg). Images are initially loaded in the form's oncurrent event. I've tried using me.dirty = false to make the form current. Has anyone experienced this before?
by: Scott Simonson | last post by:
Sorry if this posts twice. I can only assume that my previous post didn't because I attached a small image to it to show the error. I have had an application in MSAccess 2k for about year now without issues until today. My users were using it in W98 without issue, but recently moved to WindowsXP and now are getting an error. It is with the standard image control while loading a TIF image. Loading these TIFs in W98 works but not in...
by: Tim Marshall | last post by:
Is this possible does anyone know? I mean other than using imaging software. The scenario is this. I have a form with a large image control over which is imposed a grid of squares (label controls with transparent backgrounds). The image control is a map (user chooses a map or image in previous forms). The idea is to use the on click event of a label to bring up another form into which comments, etc, can be stored about that area of...
by: Jake | last post by:
I am a beginner in C# and web controls. I need a way to load an image which is stored in an Access (mdb) field into an Image control added at runtime. I get the image (jpg format) dynamically at runtime then I create an Image control (from WebControls collection) and add it to the page also at runtime. The ImageUrl property needs a URL string but I only have the image itself extracted with a data RecordSet (recordset for example.) Can...
by: David W. Simmonds | last post by:
I have a DataList control that has an Image control in the ItemTemplate. I would like to resize the image that goes into that control. I have a series of jpg files that are full size, full resolution (ie. large). I have a database that contains references to the pictures. Currently I have to resize the jpgs manually, and then point the ImageUrl property at that jpg using databinding. This works fine. I would like to avoid the resizing step...
by: Suraj Joneja | last post by:
Hi All, I've an image control on my ASP.net page. This displays an image named 'Logo.jpg' in the location '~\Images'. Another application can change this image. It can select any image and upload to the folder 'Images' and newly selected image would overwrite existing image 'Logo.jpg'. (Image name remains same and image changes). The image control on my page doesn't refresh the newly selected image. it displays the old image where as the...
by: Brian | last post by:
Using A2K I have an image control on a report and use code to set the image.picture to the required jpg. 3 of the jpgs resize properly but 2 do not - they display much smaller than the image control. The problem jpgs were originally created as line drawings in Word. They were then copy and pasted to Paint where they were saved as jpg files. Sizemode is set to stretch.(have tried clip and zoom but no better). I cannot find any way to...
by: SayamiSuchi | last post by:
hi I have taken one image control("image1") in the form("frmForm1.aspx").Now i want to one image ("mypic.jpeg") whose size is larger than the image control i.e image1.When i run the program, the image control takes the size of the image mypic.jpeg.But what i want is that the image mypic.jpeg fit in the image control along with its size.I mean the image mypic.jpeg should expand if it's size is smaller than image control and should contract if...
by: Lou O | last post by:
I have browsed and seen several posts on the subject but my issue seems to be unique. I have an image control on a form that updates on the after update event of a list box on the control. For each each item in the list box there is a corresponding jpg image displayed. Moving through the list items displays each corresponding image correctly. Double clicking the list box opens an editing form that can change the image. If the image is...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.