Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Photo


Message #1 by "George Oro" <george@c...> on Sat, 23 Nov 2002 12:59:10 +0400
Hi Guys,

Is there any way to view an image (Photo) on the form by reading the image path only in the table instead of using OLE Object field?

Any help and other tips is highly appreciated...

TIA,
George

Message #2 by "Bob Bedell" <bobbedell15@m...> on Sat, 23 Nov 2002 16:13:25 +0000
Hi George,

Get your file path and name stored in a table field. Include that field
in your form's record source. Place a text box on the form with that
field as its control source, and name the text box txtFilePath. Set its
Visible property to No if you want.

Place an unbound object frame on the form. Link to your image file
normally(in the Dialog that appears, select Create From File, check
Link, and browse to your file). Your image now appears on your form.
Name it olePicture. Clear its Source Doc property, set Enabled to Yes,
Locked to No.

Cut amd Paste the following:

Private Sub Form_Current()
    Call LinkPicture
End Sub

Private Sub txtFilePath_AfterUpdate()
    Call LinkPicture
End Sub

Sub LinkPicture()
    Me!olePicture.SourceDoc = Me!txtFilePath
    Me!olePicture.Action = acOLECreateLink
End Sub

That is.

Best,

Bob

>From: "George Oro" <george@c...>
>Reply-To: "Access" <access@p...>
>To: "Access" <access@p...>
>Subject: [access] Photo
>Date: Sat, 23 Nov 2002 12:59:10 +0400
>
>Hi Guys,
>
>Is there any way to view an image (Photo) on the form by reading the image 
>path only in the table instead of using OLE Object field?
>
>Any help and other tips is highly appreciated...
>
>TIA,
>George
>
>


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail

Message #3 by "Bob Bedell" <bobbedell15@m...> on Sat, 23 Nov 2002 16:42:20 +0000
Hi George,

The following modification will make things run a little smoother for
you by handling situations where the path field is Null (e.g., new
record).

Sub LinkPicture()
    If Not IsNull(Me!txtFilePath) Then
        Me!olePicture.Visible = True
        Me!olePicture.SourceDoc = Me!txtFilePath
        Me!olePicture.Action = acOLECreateLink
    Else
        Me!olePicture.Visible = False
    End If
End Sub







>From: "Bob Bedell" <bobbedell15@m...>
>Reply-To: "Access" <access@p...>
>To: "Access" <access@p...>
>Subject: [access] Re: Photo
>Date: Sat, 23 Nov 2002 16:13:25 +0000
>
>Hi George,
>
>Get your file path and name stored in a table field. Include that field
>in your form's record source. Place a text box on the form with that
>field as its control source, and name the text box txtFilePath. Set its
>Visible property to No if you want.
>
>Place an unbound object frame on the form. Link to your image file
>normally(in the Dialog that appears, select Create From File, check
>Link, and browse to your file). Your image now appears on your form.
>Name it olePicture. Clear its Source Doc property, set Enabled to Yes,
>Locked to No.
>
>Cut amd Paste the following:
>
>Private Sub Form_Current()
>    Call LinkPicture
>End Sub
>
>Private Sub txtFilePath_AfterUpdate()
>    Call LinkPicture
>End Sub
>
>Sub LinkPicture()
>    Me!olePicture.SourceDoc = Me!txtFilePath
>    Me!olePicture.Action = acOLECreateLink
>End Sub
>
>That is.
>
>Best,
>
>Bob
>
>>From: "George Oro" <george@c...>
>>Reply-To: "Access" <access@p...>
>>To: "Access" <access@p...>
>>Subject: [access] Photo
>>Date: Sat, 23 Nov 2002 12:59:10 +0400
>>
>>Hi Guys,
>>
>>Is there any way to view an image (Photo) on the form by reading the image 
>>path only in the table instead of using OLE Object field?
>>
>>Any help and other tips is highly appreciated...
>>
>>TIA,
>>George
>>
>>
>
>
>_________________________________________________________________
>STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
>http://join.msn.com/?page=features/junkmail
>
>
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or to 
>unsubscribe send a blank email to 


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus

Message #4 by "George Oro" <george@c...> on Tue, 26 Nov 2002 11:35:35 +0400
Thank you so much Bob, its working!!!

Cheers,
George


-----Original Message-----
From: Bob Bedell [mailto:bobbedell15@m...]
Sent: Saturday, November 23, 2002 8:42 PM
To: Access
Subject: [access] Re: Photo


Hi George,

The following modification will make things run a little smoother for
you by handling situations where the path field is Null (e.g., new
record).

Sub LinkPicture()
    If Not IsNull(Me!txtFilePath) Then
        Me!olePicture.Visible = True
        Me!olePicture.SourceDoc = Me!txtFilePath
        Me!olePicture.Action = acOLECreateLink
    Else
        Me!olePicture.Visible = False
    End If
End Sub







>From: "Bob Bedell" <bobbedell15@m...>
>Reply-To: "Access" <access@p...>
>To: "Access" <access@p...>
>Subject: [access] Re: Photo
>Date: Sat, 23 Nov 2002 16:13:25 +0000
>
>Hi George,
>
>Get your file path and name stored in a table field. Include that field
>in your form's record source. Place a text box on the form with that
>field as its control source, and name the text box txtFilePath. Set its
>Visible property to No if you want.
>
>Place an unbound object frame on the form. Link to your image file
>normally(in the Dialog that appears, select Create From File, check
>Link, and browse to your file). Your image now appears on your form.
>Name it olePicture. Clear its Source Doc property, set Enabled to Yes,
>Locked to No.
>
>Cut amd Paste the following:
>
>Private Sub Form_Current()
>    Call LinkPicture
>End Sub
>
>Private Sub txtFilePath_AfterUpdate()
>    Call LinkPicture
>End Sub
>
>Sub LinkPicture()
>    Me!olePicture.SourceDoc = Me!txtFilePath
>    Me!olePicture.Action = acOLECreateLink
>End Sub
>
>That is.
>
>Best,
>
>Bob
>
>>From: "George Oro" <george@c...>
>>Reply-To: "Access" <access@p...>
>>To: "Access" <access@p...>
>>Subject: [access] Photo
>>Date: Sat, 23 Nov 2002 12:59:10 +0400
>>
>>Hi Guys,
>>
>>Is there any way to view an image (Photo) on the form by reading the image 
>>path only in the table instead of using OLE Object field?
>>
>>Any help and other tips is highly appreciated...
>>
>>TIA,
>>George
>>
>>
>
>
>_________________________________________________________________
>STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
>http://join.msn.com/?page=features/junkmail
>
>
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or to 
>unsubscribe send a blank email to 


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus




  Return to Index