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

automatically image should change

100+
P: 140
Hi

my form name master. it gets the value from task table.
according to taskname name the picture has to change in form.. i ve given like this to view it in folder but each time they have to visit folder.

Private Sub Image40_Click()


Dim filepath As String

filepath = "C:\Documents and Settings\anithing\Desktop\barn owls"
followhyperlink filepath
Image40.o

If Me.Picture = task Then
Me.Image40.Visible = True
Else
Me.Image40.Visible = False
End If


pls help me .
Nov 18 '06 #1
Share this Question
Share on Google+
5 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
One solution would be to add a field to your 'task' table of data type OLE object. You could then link the pictures into the table in this field.

Add a Bound Object Frame to the form bound to the ole object.

I'm not sure what application you will need to set the bound object frame to use but you could experiment using he wizard.

Hi

my form name master. it gets the value from task table.
according to taskname name the picture has to change in form.. i ve given like this to view it in folder but each time they have to visit folder.

Private Sub Image40_Click()


Dim filepath As String

filepath = "C:\Documents and Settings\anithing\Desktop\barn owls"
followhyperlink filepath
Image40.o

If Me.Picture = task Then
Me.Image40.Visible = True
Else
Me.Image40.Visible = False
End If


pls help me .
Nov 18 '06 #2

100+
P: 140
One solution would be to add a field to your 'task' table of data type OLE object. You could then link the pictures into the table in this field.

Add a Bound Object Frame to the form bound to the ole object.

I'm not sure what application you will need to set the bound object frame to use but you could experiment using he wizard.
hi

i ve tried that. its not working. error is coming. like close OLE server and restart the operation outside the MS office access
Nov 18 '06 #3

100+
P: 140
One solution would be to add a field to your 'task' table of data type OLE object. You could then link the pictures into the table in this field.

Add a Bound Object Frame to the form bound to the ole object.

I'm not sure what application you will need to set the bound object frame to use but you could experiment using he wizard.

hi mary

if i accept the dataentry value as file location with ext. can i able to use it.

displaying it in the form as link to view. whats ur opinion.
Nov 18 '06 #4

PEB
Expert 100+
P: 1,418
PEB
Hi

Have you tried with unbound ole control and this code:

Expand|Select|Wrap|Line Numbers
  1. Set Forms!Orders!OLECustomControl.Picture = _
  2.     LoadPicture("Stars.bmp")
  3.  
Nov 18 '06 #5

NeoPa
Expert Mod 15k+
P: 31,661
Private Sub Image40_Click()


Dim filepath As String

filepath = "C:\Documents and Settings\anithing\Desktop\barn owls"
followhyperlink filepath
Image40.o

If Me.Picture = task Then
Me.Image40.Visible = True
Else
Me.Image40.Visible = False
End If


pls help me .
Indhu,

I can't answer your main question, I'm afraid, but I may be able to post some helpful comments.
Your Image40.o line - what is that trying to do?
It doesn't look right to me.

Try to get into the habit of setting .Visible and other boolean properties to a calculated boolean value rather than putting it in If or Select structures.
In this case it could be :
Expand|Select|Wrap|Line Numbers
  1. Me.Image40.Visible = (Me.Picture = task)
If (Me.Picture = task) resolves to True - then .Visible is set to True.
If False, then it's set to False.

Just a suggestion but it should make your code more compact and easier to maintain and understand.
Nov 18 '06 #6

Post your reply

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