Showing a linked picture on a form

  • Thread starter Thread starter Jeffri Cox \(Newsgroups\)
  • Start date 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
 
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
 
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.
 
Back
Top