Xin hướng dẫn cách chèn hình vào trong access 2007

  • Thread starter uronmapu
  • Ngày gửi
U

uronmapu

Sơ cấp
15/4/11
11
0
1
43
HN
Xin hướng dẫn cách chèn hình vào trong access 2007

Mình đang tạo 1 form thông tin học sinh, mình muốn có chức năng hiển thị và cập nhật hình cảnh của từng học sinh

Các bạn hướng dẫn mình với...

Mình muốn chức năng in nữa, khi in sẽ hiện thị cả ảnh vừa cập nhật thì thế nào

Cảm ơn các bạn và anh chị
 
Khóa học Quản trị dòng tiền
L
Ðề: Xin hướng dẫn cách chèn hình vào trong access 2007

Tôi cũng đã từng thực hiện được yêu cầu như bạn dựa vào hướng dẫn theo nguyên bản tiếng Anh sau đây :
(Lưu ý hình của học sinh bạn nên dùng hình chuẩn 4x6cm hoặc 3x4 cm và theo dịnh dạng bitmap, vi du: “Hocsinh1.bmp”)

I- Creating the Table to Store File and Path Data

1.Open the sample database Northwind.mdb.
2.Create a new table that is named Imagetable and then add a text field that is named ImagePath.
3.Open the Imagetable table in Datasheet view and then add the path and the name of a bitmap file to each record. The following examples show how the records might look:
c:\windows\circles.bmp
c:\windows\waves.bmp
c:\windows\tiles.bmp
c:\windows\bubbles.bmp

II- Displaying Images in a Form
1.Use the AutoForm: Columnar Wizard to create a new form that is based on the ImageTable table.
2.Open the Imageform form in Design view and then add an image control to the form by using the Image tool in the toolbox. You are prompted to select an image to insert. Select any image available on your computer. Name the control ImageFrame.
3.Set the OnCurrent property of the Imageform form to the following event procedure:
Private Sub Form_Current()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub

4.Set the AfterUpdate property of the ImagePath text box to the following event procedure:
Private Sub ImagePath_AfterUpdate()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub

5.Open the Imageform form in Form view. Notice that the form displays the corresponding bitmap for each record.
Displaying Images in a Report
1.You can use the AutoReport Wizard to create a new report that is based on the ImageTable table. Name the report ImageReport.
2.Open ImageReport in Design view and then add an image control to the report by using the Image tool in the toolbox. You are prompted to select an image to insert. Select any image that is available on your computer. Name the control ImageFrame.
3.Set the Format Event of the "Details" section of the report to the following Event Procedure:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me![Imageframe].picture = me![Imagepath]
End Sub

4.Open the ImageReport in Print Preview mode. Notice that the report displays the corresponding bitmap for each record.
 

Xem nhiều

Webketoan Zalo OA