Bound Object Frame in form

C

Chris

Thanks for the help in advance!
This involves embedding linked images in a Frame in an
Access form.

- I have a form pointing to a table. This table has a
field ('photoname') containing the path and filename of
jpeg images in a Windows directory.

- I wish to create a Frame that references the 'photoname'
field and shows the corresponding jpeg image as that
record is viewed. Therefore, I created a Bound Object
Frame, using the 'photoname' field as the Control Source.
I then selected 'Linked' as the OLE Type Allowed.

My problem is that the image referenced in the 'photoname'
field does not show up. Which Data Format does
the 'photoname' field need to be? When I choose 'OLE
Object' as the Data Format, the path in the field
disappears and becomes 'Long binary data'. The format
doesn't work as a Hyperlink or

Text either. Please help!

Chris
 
T

Trias

Hi Chris

i like to suggest using Image control to show the JPEG image. These are the guidelines

- Add an Image Control to your form. It will ask you to insert picture. Dont worry we'll delete it later on. So, select a valid image. Click OK to close the dialog box
- Goto the Image control properties called Picture on tab Format. Delete whatever text in it. Answer Yes, if you were asked 'do you want to remove picture'. You can also set other properties llike border, etc

Now, add this line of code to your Form Current Event

Me.YourImageControlName.Picture = Nz(Me.PhotoName, ""

and, probably to your Form AfterUpdate Event too

The Bound Object Frame is used when you, for example, store the actual JPEG image on the table, say in fields Image. The datatype of fields Image should be OLE Object.

Hope this helps
 
G

Guest

Hello Trias,
This may be helpful, but can you please tell me what the
Form 'Current Event' or my Form 'ActiveUpdate Event' are?
I can't find either of these on the Image Control
properties.

Chris
-----Original Message-----
Hi Chris,

i like to suggest using Image control to show the JPEG
image. These are the guidelines:
- Add an Image Control to your form. It will ask you to
insert picture. Dont worry we'll delete it later on. So,
select a valid image. Click OK to close the dialog box.
- Goto the Image control properties called Picture on tab
Format. Delete whatever text in it. Answer Yes, if you
were asked 'do you want to remove picture'. You can also
set other properties llike border, etc.
Now, add this line of code to your Form Current Event:

Me.YourImageControlName.Picture = Nz(Me.PhotoName, "")

and, probably to your Form AfterUpdate Event too.

The Bound Object Frame is used when you, for example,
store the actual JPEG image on the table, say in fields
Image. The datatype of fields Image should be OLE Object.
 
T

Trias

Hi Chris

when you open your Form in Design View, try to double click on the upper left hand square of the form it self. It will open the Property window of that form. Click on the Event tab (located between Data-and Other tab) in the Properties window, you will find the OnCurrent Event as the 1st item. Now, click the textbox next to OnCurrent label, 2 buttons will appear on th e righside of the textbox. Click the 'downarrow' button and select '[Event Procedure]'. When '[Event Procedure]' text appears in the textbox, click the next button (with icon as ...), you will be taken to VBA editor window and the cursor wil be placed between these text

Private Sub Form_Current(
'here is your curso
End Su

So starts typing the code which is
Me.YourImageControlName.Picture = Nz(Me.PhotoName, ""

Save your code. Close VBA Editor, close and reopen your form. you'll find the AfterUpdate Form the same way as above described. The benefit of using AfterUpdate Event is when you add new record and save the record the Image will be directly showed

Other link that might help you solve the problem is:
http://support.microsoft.com/default.aspx?scid=KB;en-us;14846

HT
----- (e-mail address removed) wrote: ----

Hello Trias
This may be helpful, but can you please tell me what the
Form 'Current Event' or my Form 'ActiveUpdate Event' are?
I can't find either of these on the Image Control
properties

Chri
-----Original Message----
Hi Chris
insert picture. Dont worry we'll delete it later on. So,
select a valid image. Click OK to close the dialog box
- Goto the Image control properties called Picture on tab
Format. Delete whatever text in it. Answer Yes, if you
were asked 'do you want to remove picture'. You can also
set other properties llike border, etcstore the actual JPEG image on the table, say in fields
Image. The datatype of fields Image should be OLE Object.
 

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