Đang chuẩn bị liên kết để tải về tài liệu:
Access 2007 VBA Programmer’s Reference phần 4

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

chẳng hạn như breakpoint và đẩy mạnh thông qua các mã, là phương pháp được chấp nhận chung nhất của gỡ lỗi mã của bạn. Tuy nhiên, có những lựa chọn khác. Một phương pháp thường được sử dụng bởi các nhà phát triển bắt đầu là đặt mã hộp thông báo trong suốt mã để kiểm tra giá trị của các biến được lựa chọn hoặc | Chapter 10 Using VBA to Enhance Forms Private Sub MyAttachment_AttachmentCurrent update the text boxes for form view where the default view is not a split form or datasheet view. If Me.CurrentView AcCurrentView.acCurViewFormBrowse _ And Me.DefaultView AcDefView.acDefViewSplitForm And Me.DefaultView AcDefView.acDefViewDataSheet Then Me.txtFileName.Value Me.MyAttachment.FileName Me.txtFileCount.Value Me.MyAttachment.AttachmentCount Me.txtFileType.Value Me.MyAttachment.FileType Else Me.txtFileName.Value Null Me.txtFileCount.Value Null Me.txtFileType.Value Null End If End Sub With this code you can now view the attachment filenames and file types extension as you browse through the attachments. It may seem redundant to explicitly retrieve the file type because it typically shows up in the filename but the purpose here is to demonstrate how to retrieve the information. This example code starts by retrieving the values for the attachment only if the form is not displayed in Split Form or Datasheet view we already learned that lesson . There may be issues or unexpected results when trying to obtain these values from other form views so the value is set to null for other cases. In specifying the values the left side of the equation identifies the text box that will display the value retrieved. The right side identifies the source of the data in this case it is looking at the control called MyAttachment. Because it s an attachment control it has some special properties including FileName FileType and AttachmentCount. FileName The actual name of the file MyPicture.jpeg will display as MyPicture.jpeg . FileType Refers to file extension or type JPEG TXT BMP PDF . AttachmentCount The number of attachments stored for that record. The event AttachmentCurrent works similar to the form s OnCurrent event in that it fires when moving the focus from one attachment to another. Within this event you can both extract information and specify the way that attachments will be represented. .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.