Pictures in Access database records

  • Thread starter Thread starter Dustirhode
  • Start date Start date
Hello Mark
I am trying to achieve the same objective, however I don't fully understand
your instructions.

Mark said:
You need to store the pictures in a separate folder from the database. DONE

Add a
field named PicturePath to your table DONE

and record the full path to the picture for each record. HOW DO YOU DO
THIS, WHAT DATA TYPE IS THIS?

Add an image control to your form I WILL CONTEMPLATE THIS MORE WHEN I
UNDERSTAND YOUR EARLIER INSTRUCTIONS.
.. Be sure you have
PicturePath in the recordsource of your form. Put the following code in the
Current Event of the form:
Me!NameOfYourImageControl.Picture = Me!PicturePath.

Thanking you in advance

Kind Regards
Tanya
 
Tanya,

Answering your one question, you can use a text field, and it's simply the
path and file name for the picture. e.g C:\PictureFolder\picture1.jpg

Fred
 
Thanks Fred
I understand the part about the textbox and am able to create the default
path for the images, however I need to identify the correct image by matching
the STUDENTID field.

Also, Name of Image Control, do you mean when I insert an image control in
the document I simple rename it to something obvious like ImgControl? then in
the properties for this object place the event Me!ImgControl.Picture =
Me!PicturePath
I am guessing here also that Me!PicturePath refers to the field name and
does not need to be replaced with the actual path to the folder?

Regards
Tanya
 
Thank you all that have helped me with this problem.

My biggest difficulty with this was understanding what to do with the
ImgControl, a little further research on the internet and I have success at
last.

Thank you again to everyone, I really appreciate your input.

Kind Regards
Tanya
 
Hi
My form is looking and working well, however I was wondering if it was
possible to change the option for viewing the image when the form is loaded,
rather than having to click on the form.
How would I go about this?
Thanks in advance.

Regards
Tanya
 
Hi Mark

I have set up my form with the text field 'picture' which contains the
default path and another textfield called picturepath which concatenates
[Picture]&[StudentID]&".jpg" and ImageControl is directed to PicturePath, and
this works wonderfully when activating the event code Me!ImageControl.Picture
= Me!PicturePath, however the event code is activated by mouse click and does
not update when the form is opened or a new record is selected.

Ideally, I would like to see the student image when focus is on a record or
perhaps a particular field and would like it updated with each record to
reflect a different student.

Kind Regards
Tanya
 
Thank you Rob, now I understand what you were talking about, I apologise, I
am not very experienced as you can see in working with events.

Kind Regards
Tanya

Rob said:
Hi Tanya,

Did you notice this instruction in my previous response:
Put the following code in the Current Event of the form:
Me!StudentImageControl.Picture = Me!StudentPicture

The Current Event fires when the form opens and each time your form goes to
a new record. Thus the image control will display the picture of the student
in the opening record and each time you change to a new student, the mage
control will display the new student.

Steve



Tanya said:
Hi Mark

I have set up my form with the text field 'picture' which contains the
default path and another textfield called picturepath which concatenates
[Picture]&[StudentID]&".jpg" and ImageControl is directed to PicturePath,
and
this works wonderfully when activating the event code
Me!ImageControl.Picture
= Me!PicturePath, however the event code is activated by mouse click and
does
not update when the form is opened or a new record is selected.

Ideally, I would like to see the student image when focus is on a record
or
perhaps a particular field and would like it updated with each record to
reflect a different student.

Kind Regards
Tanya
 
Back
Top