Showing a linked picture on a form

  • Thread starter Jeffri Cox \(Newsgroups\)
  • Start date
J

Jeffri Cox \(Newsgroups\)

I am trying to create a field that will show a picture on a form.

I am trying to link to a file rather than embedding the picture into the
database.

I have a text field with the path to the file and I have a object field to
store the picture.

My image field shows the file name not the actual image. When I double click
the object the image will open.

How to I show the picture and have it linked to my field showing the file
path?

Jeff
 
T

Trias

Hi Jeff,

i like to suggest using Image control to show your 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.YourTextPathControlName, "")

and, probably to your Form AfterUpdate Event too so that when you add new record, the image will be directly visible.


HTH

----- Jeffri Cox (Newsgroups) wrote: -----

I am trying to create a field that will show a picture on a form.

I am trying to link to a file rather than embedding the picture into the
database.

I have a text field with the path to the file and I have a object field to
store the picture.

My image field shows the file name not the actual image. When I double click
the object the image will open.

How to I show the picture and have it linked to my field showing the file
path?

Jeff
 
J

Jeffri Cox \(Newsgroups\)

Goit thanks. That works.
Jeff

Trias said:
Hi Jeff,

i like to suggest using Image control to show your 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.YourTextPathControlName, "")

and, probably to your Form AfterUpdate Event too so that when you add new
record, the image will be directly visible.
 

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