Arvin,
Maybe I need to tell what I have tried but it was not succesfull.
Since I have a prlbem with relationship and the field that I need to
have
according to your VBA, I just insert one more field which is Imagepath
(
text
type). Then I created a form with purpose to update the Image path,
since
it
is important for the VBA using Imagecontrol and Image path.
When I tested the form and I navigated it for my I works well, but when
I
go
to the next record, my picure still show up for other peole, Could you
please
explain why that happened. Moreover eventhouh the Imagepath is empty,
it
doesn/t say on the Imagecontrol " No picture" as you said.
This is my VBA:
Private Sub Form_Current()
On Error Resume Next
If Not (IsNull(Me.ImagePath)) Then
Me![ImageFrame].Picture = Me![ImagePath]
Else
Me.[ImageFrame].Picture = "C:\Private\Churchdata\NoPicture.jpg"
End If
End Sub
In my textbox this is my VBA:
Private Sub ImagePath_AfterUpdate()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub
My next question can the form ( which purpose is to update imagepath) I
will
use it as a subform in the membershipform in order to show the photo
for
each
member? athough memberform use the same query with the subform?
With many thanks
--
H. Frank Situmorang
:
If the picture for Frank is named frank.jpg, it's path should be
something
like:
Me.NameOfImageControl.Picture = "C:\Images\frank.jpg"
If there is no picture, I like to inform the user of that instead of
leaving
it blank, so I'd write code to show a file with "No Picture" I also
have
a
textbox on the form displaying the path to the image. Like:
Sub Form_Current()
If Not(IsNull(Me.txtPath) Then
Me.NameOfImageControl.Picture = Me.txtPath
Else
Me.NameOfImageControl.Picture = "C:\Images\NoPicture.jpg"
End If
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
Thanks Arvin for your advice, I still find it that the picture is
not
belong
to the person. How can we make it that it belongs to the person and
if
not
exist (because not all member yet give their pictures) it only show
a
blank
box for a moment
Thanks in advance
--
H. Frank Situmorang
:
The VBA code is in the form's current event where each member
record
shows
as the form is scrolled. The code would be:
Sub Form_Current()
Me.NameOfImageControl.Picture = "C:\PathToThePictureFile"
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
I have made general information ofmy church members is on page 1
of
tab
control. My question is can I make the picture of members on this
page.
And
what is the VBA on the control in order to follow the path of
each
individual
picures
I appreciate your help.