Inserting OLE Objects

Microsoft Access 2000 Workshop 6 Inserting OLE Objects Inserting OLE Objects A. Opening the ITClass Database Start Microsoft Access and open the ITC...
Author: Blaze Robertson
2 downloads 0 Views 454KB Size
Microsoft Access 2000 Workshop 6

Inserting OLE Objects

Inserting OLE Objects A. Opening the ITClass Database Start Microsoft Access and open the ITClass Database.

B. Opening the Students Table in Design View 1. 2. 3.

Click to select the Tables object if necessary. Open the Students table in Design View. Add a new field called Photo, and select OLE Object as the Data Type.

3. Select OLE Object as the Data Type.

4.

Close and save the Students table.

C. Adding the OLE Object in the Students Form 1. 2. 3.

Click to select the Forms object. Open the Students Form in Design View. Choose Toolbox from the View menu if necessary.

3. Choose Toolbox from the View menu.

Designed by T. S. Wong

1

http://www.wong-sir.com

Microsoft Access 2000 Workshop 6

4.

Inserting OLE Objects

Click the Bound Object Frame button in the Toolbox.

4. Click the Bound Object Frame button.

5.

Drag a rectangular area of 3 squares by 4 squares as shown below.

5. Click here to start dragging a rectangular area.

6.

Drag a rectangular area of 3 squares by 4 squares.

With the newly created OLEBound object selected, choose Properties from the View menu.

6. Choose Properties from the View menu.

Designed by T. S. Wong

2

http://www.wong-sir.com

Microsoft Access 2000 Workshop 6

7. 8.

Inserting OLE Objects

Click the Data tab to display its options. Click the Down arrow of the Control Source drop-down list to see its options. (Note that the newly created Photo field in the Students table is not available for Control Source in the drop-down list.) 8. Click the Down arrow to display the options.

7. Click the Data tab to display its options.

The Photo field is not available in the list.

9.

Select Form from the Object drop-down list.

9. Select Form from the Object drop-down list.

10. Click the

button to display the SQL Statement: Query Builder window.

10. Click this button to open the SQL Statement: Query Builder window.

Designed by T. S. Wong

3

http://www.wong-sir.com

Microsoft Access 2000 Workshop 6

Inserting OLE Objects

11. In the SQL Statement: Query Builder window, scroll the Students table until the field Photo can be seen.

11. Scroll until Photo is seen.

12. Drag the Photo field anywhere to the frame below.

12. Drag the Photo field to the frame below.

13. Close the SQL Statement: Query Builder window and save the changes.

Designed by T. S. Wong

4

http://www.wong-sir.com

Microsoft Access 2000 Workshop 6

Inserting OLE Objects

14. Click to select the newly created OLEBound object.

Note that the name of the Title Bar also changes.

14. Click to select the OLEBound object.

15. Click in the Control Source drop-down list box. 15. Click in the Control Source drop-down list box.

16. Select Photo from the list.

16. Select Photo from the drop-down list.

Designed by T. S. Wong

5

http://www.wong-sir.com

Microsoft Access 2000 Workshop 6

Inserting OLE Objects

17. Click the OLEBound Object label once, and then again to make it editable.

18. Change its name to Photo.

18. Change its name (e.g., OLEBound18:) to Photo. 19. Click the OLEBound Object again to select it. 20. Drag to align it with the fields above.

19. Click to select the OLEBound Object again.

20. Align it with the other fields above.

21. Save all the changes and close the Students form in Design View.

D. Inserting Photos to the Photo Field in Form View 1.

Double-click the Students form to open it in Form View.

2. Choose Object… from the Insert menu.

1. Click to select the OLEBound Object.

2.

Choose Object… from the Insert menu.

Designed by T. S. Wong

6

http://www.wong-sir.com

Microsoft Access 2000 Workshop 6

3.

Inserting OLE Objects

In the Insert Object dialog box, click the Create from File option. 3. Click the Create from file option.

4. Click the Browse… button.

4. 5.

Click the Browse… button to open the Browse dialog box. In the Browse dialog box, navigate to the desired folder or directory (e.g., E:\TSWONG\Students Photos) through the Look in drop-down list. 6. Double-click Betty.jpg 5. Move to the desired folder for the photos.

6. 7.

In the Students Photos folder, double-click Betty.jpg to select it and return to the Insert Object dialog box. Back to the Insert Object dialog box, click the OK button to insert the photo for the record Betty. (Note that the inserted photo has been clipped.) 7. Click the OK button.

Designed by T. S. Wong

Note that the photo has been clipped.

7

http://www.wong-sir.com

Microsoft Access 2000 Workshop 6

8.

Inserting OLE Objects

Still in Form View, choose Properties from the View menu.

8. Choose Properties from the View menu.

9.

Click the Format tab if necessary. 9. Click the Format tab if necessary.

10. Select Zoom from the options.

10. Select the Zoom option for Size Mode. 11. Close the Properties dialog box. 12. Move to the next records and insert photos for Peter, Nancy, and so on using similar procedures.

12. Move to the next records one by one to insert the photos.

13. After having finished inserting all the photos, exit Microsoft Access 2000. (Save all changes in the Students form when prompted.) Designed by T. S. Wong

8

http://www.wong-sir.com