Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Questions on linking photos

Status
Not open for further replies.

ChoonHong

Programmer
Jul 22, 2003
28
SG
Hi all,

I have a question to ask, when i refer to your thread (thread702-446213) I tried to use the method that Chrissie had suggest. But it prompt me a "compile error: Method or data member not found".

I have already create a data called "File" in my table but why was there still an error in my code? My code is like this:

Private Sub Form_Current()
Me.ctl.Picture = LoadPicture("C:\Documents and Settings\chteo\Desktop\Storeroom Database\Store Spare Parts Pictures\" & Me.File & ".Jpg")
End Sub

Hope that the expert can help me on this. Thks!
 
I would query this site for some more on this topic because there has been a ton of stuff written on it. Chrissie suggestion is different from the other reply in that post. She talks about an Access image control and the other suggestion deals with an ActiveX control. I think you are using a combination thus the error. The loadpicture function loads a picture into an ActiveX control. Why use an ActiveX control when a Access control would work fine?
 
How are ya ChoonHong . . .

Your field [blue]File[/blue] should be populated with the Path & Filename of the graphics for each record. Be sure [blue]File[/blue] is included in the recordsource of the form . . . then its simply:
Code:
[blue]Me!ImageCtlName.Picture = Me!File[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top