Picture of members in the page1 of tab

F

Frank Situmorang

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.
 
A

Arvin Meyer [MVP]

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
 
F

Frank Situmorang

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
 
A

Arvin Meyer [MVP]

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
 
F

Frank Situmorang

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
 
A

Arvin Meyer [MVP]

It won't work, if I remember correctly in a subform in Continuous view. But
I think it will work in a subreport. At least it did the last time I tried
it which was about 7 or 8 years ago.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Frank Situmorang said:
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


Arvin Meyer said:
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
 
F

Frank Situmorang

Arvin,
Fro your info, I did not make it on a continous form, but on a single form,
then I put controltab on the detail of a form, and on the 1st tab, I put all
general information about the member including pictures, on the 2nd tab, how
the member was accepted and the 3rd tab, how the member was quitted and the
4th tab the tracked record of the member. The 2nd upto the 4th are
confidential, that is why I aksed on other threads how to make pasword for
these, and someone already gave me the VBA

I appreciate Arvin, if you could still give an ideo on how to make it works
on photo
--
H. Frank Situmorang


Arvin Meyer said:
It won't work, if I remember correctly in a subform in Continuous view. But
I think it will work in a subreport. At least it did the last time I tried
it which was about 7 or 8 years ago.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Frank Situmorang said:
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


Arvin Meyer said:
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.
 
A

Arvin Meyer [MVP]

That code should work fine. Try commenting out the Error handler:
' On Error Resume Next

and see what the error number.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


Frank Situmorang said:
Arvin,
Fro your info, I did not make it on a continous form, but on a single
form,
then I put controltab on the detail of a form, and on the 1st tab, I put
all
general information about the member including pictures, on the 2nd tab,
how
the member was accepted and the 3rd tab, how the member was quitted and
the
4th tab the tracked record of the member. The 2nd upto the 4th are
confidential, that is why I aksed on other threads how to make pasword for
these, and someone already gave me the VBA

I appreciate Arvin, if you could still give an ideo on how to make it
works
on photo
--
H. Frank Situmorang


Arvin Meyer said:
It won't work, if I remember correctly in a subform in Continuous view.
But
I think it will work in a subreport. At least it did the last time I
tried
it which was about 7 or 8 years ago.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Frank Situmorang said:
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.
 
F

Frank Situmorang

Arvin,

For the no picture yet, the textfield for the image path is blank, but how
can we make it to write on the imageframe " Nopicture.Jpg"
 
F

Frank Situmorang

Arvin,

Thanks for your help to us in a developping country for informing the way to
put picture on the form. It already work if there is a file picture in the
image tabe ( ImagePath field I have ttested it for my picture. But fot the
empty record it shows nothing, I already put an impty image with the text on
it " No picture" but it won't work.

Can you help me what's the problem? it just shows the blan image frame.

this is maVBA in on current of the form and on afterupdate of imagepath text
box on the form:
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

Private Sub ImagePath_AfterUpdate()
On Error Resume Next
If Not (IsNull(Me.ImagePath)) Then
Me.ImageFrame.Picture = Me.ImagePath
End If
End Sub


Do mean to say that there is another text box vor the no picure?,

Ok I will try to make another textbox
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top