Access 2002 OLE Object embedding

G

Guest

Is there a better way for non-programers to store and veiw .jpg photos in
Access and on reports. I have seen solutions using specialized programs,
which I have downloaded and looked at, but I don't understand how to use them
in my databases. I need to see the photos in the forms and print them on
reports. Everything works fine but the database gets real big.
 
G

Guest

If it is just pictures, you can store the path to the picture in your table.
Then use the image contol on your forms and reports. In your form in the on
current event put some code like:

Me![Pic1].picture= Me![text1]

You can hide the text box that is holding the path. You will also want to
put that code where you are setting the path. On reports put that code in
the on format of the details section.
 
G

Guest

Do I store the path in a Text field, OLE field, Link field ?
Define your code? What is [Pic1] and [text1] Me. and .picture?
Where does this code go in the field properties or the form properties?
Can you say what you said simplier for a non-programer?

Thank you,


schasteen said:
If it is just pictures, you can store the path to the picture in your table.
Then use the image contol on your forms and reports. In your form in the on
current event put some code like:

Me![Pic1].picture= Me![text1]

You can hide the text box that is holding the path. You will also want to
put that code where you are setting the path. On reports put that code in
the on format of the details section.

Gary S said:
Is there a better way for non-programers to store and veiw .jpg photos in
Access and on reports. I have seen solutions using specialized programs,
which I have downloaded and looked at, but I don't understand how to use them
in my databases. I need to see the photos in the forms and print them on
reports. Everything works fine but the database gets real big.
 
G

Guest

[pic1] is the name of the picture control, [text1] is the name of the textbox
on the form or report that has the path. I would make the table with a text
or memo (if you could have real long path names). for the on current click
the form properties, event tab, click in the on current event, click the
three dots, and select event procedure. Do something simular on the report
but on the details section, events tab and on format.

Gary S said:
Do I store the path in a Text field, OLE field, Link field ?
Define your code? What is [Pic1] and [text1] Me. and .picture?
Where does this code go in the field properties or the form properties?
Can you say what you said simplier for a non-programer?

Thank you,


schasteen said:
If it is just pictures, you can store the path to the picture in your table.
Then use the image contol on your forms and reports. In your form in the on
current event put some code like:

Me![Pic1].picture= Me![text1]

You can hide the text box that is holding the path. You will also want to
put that code where you are setting the path. On reports put that code in
the on format of the details section.

Gary S said:
Is there a better way for non-programers to store and veiw .jpg photos in
Access and on reports. I have seen solutions using specialized programs,
which I have downloaded and looked at, but I don't understand how to use them
in my databases. I need to see the photos in the forms and print them on
reports. Everything works fine but the database gets real big.
 
G

Guest

I tried what you said, and it does not work.

This is my "Event Expression" in the Form Properties under "On Current"

Private Sub Form_Current()
Me![OLEBound14].Picture = Me![Path1]
End Sub

My Table is called "Table1"
The field in my table containing the path is called "Path1"
I created the form with a wizard and included all fields from "Table1"
I then added a "Bound Object Frame" and Access named it "OLEBound14"
I went in to the Form Proporties and added the above Event.
I copied a path to a .jpg photo and pasted it into the "Path1" field in
Record 1.
When I run the form no errors appear but the form does not display the photo.
What am I doing wrong?

schasteen said:
[pic1] is the name of the picture control, [text1] is the name of the textbox
on the form or report that has the path. I would make the table with a text
or memo (if you could have real long path names). for the on current click
the form properties, event tab, click in the on current event, click the
three dots, and select event procedure. Do something simular on the report
but on the details section, events tab and on format.

Gary S said:
Do I store the path in a Text field, OLE field, Link field ?
Define your code? What is [Pic1] and [text1] Me. and .picture?
Where does this code go in the field properties or the form properties?
Can you say what you said simplier for a non-programer?

Thank you,


schasteen said:
If it is just pictures, you can store the path to the picture in your table.
Then use the image contol on your forms and reports. In your form in the on
current event put some code like:

Me![Pic1].picture= Me![text1]

You can hide the text box that is holding the path. You will also want to
put that code where you are setting the path. On reports put that code in
the on format of the details section.

:

Is there a better way for non-programers to store and veiw .jpg photos in
Access and on reports. I have seen solutions using specialized programs,
which I have downloaded and looked at, but I don't understand how to use them
in my databases. I need to see the photos in the forms and print them on
reports. Everything works fine but the database gets real big.
 
G

Guest

I do get an error message "Object does not support this property or method"

When I click on Debug it takes me to the event procedure and highlights the
center line with the command in it.

schasteen said:
[pic1] is the name of the picture control, [text1] is the name of the textbox
on the form or report that has the path. I would make the table with a text
or memo (if you could have real long path names). for the on current click
the form properties, event tab, click in the on current event, click the
three dots, and select event procedure. Do something simular on the report
but on the details section, events tab and on format.

Gary S said:
Do I store the path in a Text field, OLE field, Link field ?
Define your code? What is [Pic1] and [text1] Me. and .picture?
Where does this code go in the field properties or the form properties?
Can you say what you said simplier for a non-programer?

Thank you,


schasteen said:
If it is just pictures, you can store the path to the picture in your table.
Then use the image contol on your forms and reports. In your form in the on
current event put some code like:

Me![Pic1].picture= Me![text1]

You can hide the text box that is holding the path. You will also want to
put that code where you are setting the path. On reports put that code in
the on format of the details section.

:

Is there a better way for non-programers to store and veiw .jpg photos in
Access and on reports. I have seen solutions using specialized programs,
which I have downloaded and looked at, but I don't understand how to use them
in my databases. I need to see the photos in the forms and print them on
reports. Everything works fine but the database gets real big.
 
G

Guest

It look like you are using a bound or unbound object frame control. Replace
this control with an image control. This is usaully located next to the
object frame controls on the toolbar. When you fist create it on a form, it
will prompt you for a picture. Just select something to hold the place until
the code inserts the picture from your path.

Gary S said:
I do get an error message "Object does not support this property or method"

When I click on Debug it takes me to the event procedure and highlights the
center line with the command in it.

schasteen said:
[pic1] is the name of the picture control, [text1] is the name of the textbox
on the form or report that has the path. I would make the table with a text
or memo (if you could have real long path names). for the on current click
the form properties, event tab, click in the on current event, click the
three dots, and select event procedure. Do something simular on the report
but on the details section, events tab and on format.

Gary S said:
Do I store the path in a Text field, OLE field, Link field ?
Define your code? What is [Pic1] and [text1] Me. and .picture?
Where does this code go in the field properties or the form properties?
Can you say what you said simplier for a non-programer?

Thank you,


:

If it is just pictures, you can store the path to the picture in your table.
Then use the image contol on your forms and reports. In your form in the on
current event put some code like:

Me![Pic1].picture= Me![text1]

You can hide the text box that is holding the path. You will also want to
put that code where you are setting the path. On reports put that code in
the on format of the details section.

:

Is there a better way for non-programers to store and veiw .jpg photos in
Access and on reports. I have seen solutions using specialized programs,
which I have downloaded and looked at, but I don't understand how to use them
in my databases. I need to see the photos in the forms and print them on
reports. Everything works fine but the database gets real big.
 
G

Guest

Thank you, Now it works, I do get an error when I don't have a path in a
record or when I click on add a new record. Can you tell me how to put a
line to ignore an error generated from a blank path field?

schasteen said:
It look like you are using a bound or unbound object frame control. Replace
this control with an image control. This is usaully located next to the
object frame controls on the toolbar. When you fist create it on a form, it
will prompt you for a picture. Just select something to hold the place until
the code inserts the picture from your path.

Gary S said:
I do get an error message "Object does not support this property or method"

When I click on Debug it takes me to the event procedure and highlights the
center line with the command in it.

schasteen said:
[pic1] is the name of the picture control, [text1] is the name of the textbox
on the form or report that has the path. I would make the table with a text
or memo (if you could have real long path names). for the on current click
the form properties, event tab, click in the on current event, click the
three dots, and select event procedure. Do something simular on the report
but on the details section, events tab and on format.

:

Do I store the path in a Text field, OLE field, Link field ?
Define your code? What is [Pic1] and [text1] Me. and .picture?
Where does this code go in the field properties or the form properties?
Can you say what you said simplier for a non-programer?

Thank you,


:

If it is just pictures, you can store the path to the picture in your table.
Then use the image contol on your forms and reports. In your form in the on
current event put some code like:

Me![Pic1].picture= Me![text1]

You can hide the text box that is holding the path. You will also want to
put that code where you are setting the path. On reports put that code in
the on format of the details section.

:

Is there a better way for non-programers to store and veiw .jpg photos in
Access and on reports. I have seen solutions using specialized programs,
which I have downloaded and looked at, but I don't understand how to use them
in my databases. I need to see the photos in the forms and print them on
reports. Everything works fine but the database gets real big.
 
G

Guest

Never Mind, I figured out how to put an Error Code in the Routine. It works
great. Thank you very much for your help.


schasteen said:
It look like you are using a bound or unbound object frame control. Replace
this control with an image control. This is usaully located next to the
object frame controls on the toolbar. When you fist create it on a form, it
will prompt you for a picture. Just select something to hold the place until
the code inserts the picture from your path.

Gary S said:
I do get an error message "Object does not support this property or method"

When I click on Debug it takes me to the event procedure and highlights the
center line with the command in it.

schasteen said:
[pic1] is the name of the picture control, [text1] is the name of the textbox
on the form or report that has the path. I would make the table with a text
or memo (if you could have real long path names). for the on current click
the form properties, event tab, click in the on current event, click the
three dots, and select event procedure. Do something simular on the report
but on the details section, events tab and on format.

:

Do I store the path in a Text field, OLE field, Link field ?
Define your code? What is [Pic1] and [text1] Me. and .picture?
Where does this code go in the field properties or the form properties?
Can you say what you said simplier for a non-programer?

Thank you,


:

If it is just pictures, you can store the path to the picture in your table.
Then use the image contol on your forms and reports. In your form in the on
current event put some code like:

Me![Pic1].picture= Me![text1]

You can hide the text box that is holding the path. You will also want to
put that code where you are setting the path. On reports put that code in
the on format of the details section.

:

Is there a better way for non-programers to store and veiw .jpg photos in
Access and on reports. I have seen solutions using specialized programs,
which I have downloaded and looked at, but I don't understand how to use them
in my databases. I need to see the photos in the forms and print them on
reports. Everything works fine but the database gets real big.
 
G

Guest

Download a copy of Office XP from Bittorrent and then install JUST Photo
Editor. Don't install the rest. It will register Photo Editor for OLE in
Access and then it should work. A shame MS is encouraging you to use their
OLDER products since they BROKE the functionality in their newer office apps.
The amazing thing is that MS still hasn't addressed this in Office 2007!!!
 

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