Show Picture in a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table where I store the employee picture. I have a form where I
would like to have the picture show when the employee is choosen from a combo
box. Is this done with Object frames?
Can some one help me set this up please.
thank you
victor.
 
Victor,

I recommend against actually storing the picture in the database. This will
bloat your database incredibly, and, depending on the size of your company,
and the size of the images, could cause you to rapidly approach the maximum
file size (2GB for 2003) of an Access database. Instead, I recommend
storing the file name in the database in a field [PhotoFile].

Then, add an image control to your form, but don't actually assign a photo
to it. Actually, I would even set the visible property to False. Then, in
the forms Current event, I would check to see whether there is an entry in
the [PhotoFile] field for this employee. If there is, then set the images
Picture property to the value in your [PhotoFile] field and set the visible
property to True. To enhance this further, you might also want to create a
label of the same size as the image, put it in the same place as the image
and give it text that reads "Employee photo not available". If there is no
data in the [PhotoFile] field, then make this label visible, if there is
data, make the image visible and the label invisible.

HTH
Dale
 
Dale Fye said:
Victor,

I recommend against actually storing the picture in the database. This
will bloat your database incredibly, and, depending on the size of your
company, and the size of the images, could cause you to rapidly approach
the maximum file size (2GB for 2003) of an Access database. Instead, I
recommend storing the file name in the database in a field [PhotoFile].

Then, add an image control to your form, but don't actually assign a photo
to it. Actually, I would even set the visible property to False. Then,
in the forms Current event, I would check to see whether there is an entry
in the [PhotoFile] field for this employee. If there is, then set the
images Picture property to the value in your [PhotoFile] field and set the
visible property to True. To enhance this further, you might also want to
create a label of the same size as the image, put it in the same place as
the image and give it text that reads "Employee photo not available". If
there is no data in the [PhotoFile] field, then make this label visible,
if there is data, make the image visible and the label invisible.

HTH
Dale

visidro said:
I have a table where I store the employee picture. I have a form where I
would like to have the picture show when the employee is choosen from a
combo
box. Is this done with Object frames?
Can some one help me set this up please.
thank you
victor.
 
Thanks for your reply Dale. I am faily new to access can you take me step by
step please.
I understand about storing the filename but
How do I check exactly to see if there is an entry, and set the property
values, ect
can you help me with the code please.
thank you very much.


Dale Fye said:
Victor,

I recommend against actually storing the picture in the database. This will
bloat your database incredibly, and, depending on the size of your company,
and the size of the images, could cause you to rapidly approach the maximum
file size (2GB for 2003) of an Access database. Instead, I recommend
storing the file name in the database in a field [PhotoFile].

Then, add an image control to your form, but don't actually assign a photo
to it. Actually, I would even set the visible property to False. Then, in
the forms Current event, I would check to see whether there is an entry in
the [PhotoFile] field for this employee. If there is, then set the images
Picture property to the value in your [PhotoFile] field and set the visible
property to True. To enhance this further, you might also want to create a
label of the same size as the image, put it in the same place as the image
and give it text that reads "Employee photo not available". If there is no
data in the [PhotoFile] field, then make this label visible, if there is
data, make the image visible and the label invisible.

HTH
Dale

visidro said:
I have a table where I store the employee picture. I have a form where I
would like to have the picture show when the employee is choosen from a
combo
box. Is this done with Object frames?
Can some one help me set this up please.
thank you
victor.
 

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

Back
Top