TAILIEUCHUNG - Access 2007 VBA Programmer’s Reference phần 4

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 _ And And Then Else Null Null 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 will display as . 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. .

TỪ KHÓA LIÊN QUAN
Đã 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.