By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,620 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

Diplaying picture on the form

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

01 XYX product1.JPG
02 ABC product2.JPG

My requirment is when i click the button 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 sql,currproject.connection

on both images..the same picture is displaying.. i need to display AB.JPG on image2.....
Thanks in advance
Oct 25 '06 #1
Share this Question
Share on Google+
4 Replies

Expert Mod 15k+
P: 31,347
When you execute the line
'picture' is still set to the image from the current record of the recordset.
You need to execute something like
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

P: 3
thanks for the response..i tried to use
call rst.movenext
but it is still displaying the same pictures
Oct 25 '06 #3

Expert Mod 15k+
P: 31,347
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

P: 3
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

Post your reply

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