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

Diplaying picture on the form

Hi guys
Can anyone please help me out i need to display image on form .i have a requirment
iam pulling data from query...

PRDID PRDNAME PRDPIC
01 XYX product1.JPG
02 ABC product2.JPG

My requirment is when i click the button ..it will display the images on below each other
iam doing this,please correct me

private sub cmd_click()
dim sql as string
sql ="select prdpic from query
dim rst as recordset
set rst=new recordset
rst_sql.open sql,currproject.connection
picture=rst_sql!prdpic
me.image1.picture=picture
me.image2.picture=picture

on both images..the same picture is displaying.. i need to display AB.JPG on image2.....
Thanks in advance
Oct 25 '06 #1
4 1468
NeoPa
32,556 Expert Mod 16PB
When you execute the line
me.image2.picture=picture
'picture' is still set to the image from the current record of the recordset.
You need to execute something like
rst.MoveNext
to set the new current record then assign the picture.

Something like
Expand|Select|Wrap|Line Numbers
  1. me.image1.picture=rst!prdpic
  2. Call rst.MoveNext
  3. me.image2.picture=rst!prdpic
Oct 25 '06 #2
thanks for the response..i tried to use
call rst.movenext
but it is still displaying the same pictures
Oct 25 '06 #3
NeoPa
32,556 Expert Mod 16PB
I'm a little confused then.
Perhaps you could cut and paste the actual code you're currently using into this thread for a thorough check through.

An idea of which tables store which data and which dataset (if any) the form is bound to would also be helpful.
Oct 25 '06 #4
Thanks NeoPa
It is working fine now.i've checked the table and query bound to the form... thanks for ur help......
Thanks again!
Oct 25 '06 #5

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

Similar topics

10
by: Chris Coho, Jr. | last post by:
Ok, I'll explain the whole problem because there may be several ways to solve this and hopefully someone knows one. What I'm doing is creating a specialty template editor, similar to say a corel...
1
by: Matt Evans | last post by:
Hi, this must have been asked for before, but I cannot see it. Hopefully this is very simple. I have a form which shows everything from a table. In this table is a picture field called photo....
2
by: Lyn | last post by:
I am trying to embed a picture into a Bound Object Frame (Me!Photograph) with the following code which is based on MS article http://support.microsoft.com/?id=158941: strPathname =...
0
by: Lyn | last post by:
This one is driving me crazy. I have a table which stores pictures in an OLE Object column, one per record with a few other text fields (caption, date, etc). This table is maintained with a...
6
by: John Ortt | last post by:
Hi there everyone, I have a part info form which has a faded image of our company logo as a background. I want to replace the faded image with a bright red warning image on items which have run...
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...
4
by: MLH | last post by:
Setting form's Picture property to another file from within VBA doesn't repaint the form with new bitmap - for instance... Me.Picture = "c:\pics\MyNewPic.jpg" I tried Me.Repaint afterward,...
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...
3
Alireza355
by: Alireza355 | last post by:
I have a switchboard, which maximises upon loading. In the form DETAIL section, I have embedded a picture, so when the form opens and maximises, the picture is the background. The picture is 1024...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
Oralloy
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,...
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...

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.