thanks for this article. I was just trying to do the store links and image
control with much dificult. if followed the steps below this email and cant
get the pictures to update to the respective detail. the picture I select in
step 3 substep 5 remains on every detail. I am currently looking for my disk
to check the Northwind sample for copying.
also, can I go in and delete all the embedded images to reduce the bloated
file back down to reasonable size?
Add a picture or object that changes from record to record
You can use an image control to display a bound picture in a form, report,
or data access page. To display a bound embedded or linked picture or object
on a form or report, you must create a bound object frame.
Add a bound image control
1.. Do one of the following:
a.. To display pictures that change from record to record without
storing them in a table, create a text field to store the locations of the
image files. You must store the locations of the pictures in a text field if
you want to display the pictures in a data access page. You can also use a
text field to store the location of pictures and then use those pictures in
a form or report, but you must use Visual Basic event procedures to display
the pictures.
2.. Open the form, report, or data access page in Design view.
3.. Do one of the following:
In a form or report, add an image control that is bound to a text field
containing the paths to the pictures
1.. If the field list isn't displayed, click Field List on the toolbar.
2.. From the field list, drag the field that contains the locations of
the pictures to the form or report.
3.. In the toolbox, click the Image tool .
4.. On the form or report, click where you want to place the object.
5.. In the Insert Picture dialog box, specify the path to any picture,
and then click OK. For example, you can type the path to the picture for the
first record.
6.. Double-click the form selector or the report selector to open the
property sheet.
7.. Click the Build button next to the OnCurrent property box, and then
click Code Builder in the Choose Builder dialog box.
8.. Create the following event procedure. Substitute the name of the
image control on your form or report for ImageControlName and the name of
the control containing the path for ImagePath.
Private Sub Form_Current()On Error Resume NextMe![ImageControlName].Picture
= Me![ImagePath]End SubNote that if you are adding the event procedure in a
report, the first line of the procedure will be the following:
Private Sub Report_Current()9.. On the File menu in the Visual Basic Editor,
click Close and return to Microsoft Access.
10.. Click the control that is bound to the text field containing the
location of the pictures, and then click Properties on the toolbar to open
the property sheet..
11.. Click the Build button next to the AfterUpdate property box, click
Code Builder in the Choose Builder dialog box, and create the following
event procedure. Substitute the name of the image control on your form or
report for ImageControlName and the name of the control containing the path
for ImagePath.
Private Sub ImagePath_AfterUpdate()On Error Resume
NextMe![ImageControlName].Picture = Me![ImagePath]End SubThis event
procedure enables you to add or change a picture location in Form view.
12.. On the File menu in the Visual Basic Editor, click Close and return
to Microsoft Access.
Note To see an example of an image control that is bound to a field
containing the locations of pictures, open the Employees form in the
Northwind sample database.