Q
quinto via AccessMonster.com
I followed the direction below and I got stuck on the Form_Current event
procedure: ImageFrame.Picture=ImagePath. Where eaxaclty am I suppose to put
this? I cannot find a line Form_Current event procedure
Thank
Quinto
I just looked at Northwind for Access 2003 - I still do most of my Access
work in Access 2000.
Yes, the technique has changed; in older versions, it worked as I had
described in my previous post.
And while the older technique had the limitations I mentioned, it did have
the advantage of simplicity.
To follow (or reproduce) the technique used in the 2003 version of
Northwind, you'll have to use some VBA code.
The heart of the matter is on Line 37 of the Employee form's module; the
rest of that procedure is about dealing with cases where you don't have a
full path entered.
For simplicity, you can do this:
Make sure you have a Text field in your table, with a full path to an
existing picture file for each record. Let's call it ImagePath.
Now put an (unbound) Image Frame on your form, and name it ImageFrame.
Also put a bound textbox on your form; you can set both its name and its
ControlSource to "ImagePath".
Put this code in your Form_Current event procedure:
ImageFrame.Picture=ImagePath
You should now be able to move through the records in your form, and see a
picture for each one.
If you want to change the picture, edit the textbox, move to a different
record, then when you come back to this one, you should see the new picture.
Remember, this is just for starters, a simple way to start building this
technique.
Once you get this going, you may be able to study some more of the code and
figure out how to refine this model. If you have specific questions, do
post back. Remember to tell us:
What is it doing that you don't want?
What isn't it doing that you do want?
procedure: ImageFrame.Picture=ImagePath. Where eaxaclty am I suppose to put
this? I cannot find a line Form_Current event procedure
Thank
Quinto
I just looked at Northwind for Access 2003 - I still do most of my Access
work in Access 2000.
Yes, the technique has changed; in older versions, it worked as I had
described in my previous post.
And while the older technique had the limitations I mentioned, it did have
the advantage of simplicity.
To follow (or reproduce) the technique used in the 2003 version of
Northwind, you'll have to use some VBA code.
The heart of the matter is on Line 37 of the Employee form's module; the
rest of that procedure is about dealing with cases where you don't have a
full path entered.
For simplicity, you can do this:
Make sure you have a Text field in your table, with a full path to an
existing picture file for each record. Let's call it ImagePath.
Now put an (unbound) Image Frame on your form, and name it ImageFrame.
Also put a bound textbox on your form; you can set both its name and its
ControlSource to "ImagePath".
Put this code in your Form_Current event procedure:
ImageFrame.Picture=ImagePath
You should now be able to move through the records in your form, and see a
picture for each one.
If you want to change the picture, edit the textbox, move to a different
record, then when you come back to this one, you should see the new picture.
Remember, this is just for starters, a simple way to start building this
technique.
Once you get this going, you may be able to study some more of the code and
figure out how to refine this model. If you have specific questions, do
post back. Remember to tell us:
What is it doing that you don't want?
What isn't it doing that you do want?