Home All Groups Group Topic Archive Search About
Author
6 Jun 2009 1:09 AM
Jason
Access 97. I'm using the following code to embed photo but it is not being
saved:

        With Forms(stDocName)
            AssetPhotoPath = Nz(AssetPhotoPath, "")
            !AssetPhotoPath = AssetPhotoPath
            !AssetPhoto.OLETypeAllowed = acOLELinked
            !AssetPhoto.SourceDoc = AssetPhotoPath
            !AssetPhoto.Action = acOLECreateLink
            End With

Thansk,
J.

Author
8 Jun 2009 12:46 PM
Fred
Not to leave the false impression that I really know this stuff, but your
code looks way more complicated than it needs to be.

e.g to display a picture in a form we just have the following in the form's
"on current" event:

Private Sub Form_Current()

Me.Image17.Picture = Me.PicturePathAndFile

End Sub


Me.Image17 is the name of the box, and PicturePathAndFile is the name of the
text field that stores the lication and file name of the picture.
Are all your drivers up to date? click for free checkup

Author
15 Jun 2009 8:09 AM
Jason
Your code generated an error. I put ' in front of it. For some reason my
code is working.
Show quoteHide quote
"Fred" <F***@discussions.microsoft.com> wrote in message
news:8D166F49-C050-4A41-AF61-365350CCA7EC@microsoft.com...
> Not to leave the false impression that I really know this stuff, but your
> code looks way more complicated than it needs to be.
>
> e.g to display a picture in a form we just have the following in the
> form's
> "on current" event:
>
> Private Sub Form_Current()
>
> Me.Image17.Picture = Me.PicturePathAndFile
>
> End Sub
>
>
> Me.Image17 is the name of the box, and PicturePathAndFile is the name of
> the
> text field that stores the lication and file name of the picture.
>
>
Author
9 Jun 2009 8:24 AM
Jason
This was the code I was given by someone on here or was referred to a site
that contained it. Shall try your code when I get time to test it.

Thanks,
J.
Show quoteHide quote
"Jason" <J***@Yahoo.com.au> wrote in message
news:ONA50Nk5JHA.4932@TK2MSFTNGP02.phx.gbl...
> Access 97. I'm using the following code to embed photo but it is not being
> saved:
>
>        With Forms(stDocName)
>            AssetPhotoPath = Nz(AssetPhotoPath, "")
>            !AssetPhotoPath = AssetPhotoPath
>            !AssetPhoto.OLETypeAllowed = acOLELinked
>            !AssetPhoto.SourceDoc = AssetPhotoPath
>            !AssetPhoto.Action = acOLECreateLink
>            End With
>
> Thansk,
> J.
>

Bookmark and Share