กระทู้เก่าบอร์ด อ.Yeadram
        
           1,452   2		  
          
					  
		    URL.หัวข้อ / 
		    URL
        
        รูปภาพไม่แสดงใน Report ต้องแก้ไขอย่างไรครับ      
    
      รูปภาพไม่แสดงใน Report ต้องแก้ไขอย่างไรครับ
ในหน้า Rerport มี Text box ชื่อ txtpic1 ซึ่ง control Source มาจากตาราง ชื่อ field คือ Picsurv1 เป็นที่เก็บ path ของรูป C:\Documents and Settings\User\My Documents\untitled1.bmp
และ Frame Image ชื่อ fme1 ซึ่งต้องการให้ แสดงรูปภาพใน Frame จาก path ที่ text box
ผมเขียน code เพื่อให้ แสดงรูป แต่มัน debug ที่บรรทัด if isnull เลยครับ
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error Resume Next
If IsNull(Me.txtpic1, "") = "" Then
Me.fme1.Picture = ""
Me.fme1.Visible = False
ElseIf Dir(Me.txtpic1) = "" Then
Me.fme1.Picture = ""
Me.fme1.Visible = False
Else
Me.fme1.Picture = Me.txtpic1
Me.fme1.Visible = True
End If
End Sub
    
  ในหน้า Rerport มี Text box ชื่อ txtpic1 ซึ่ง control Source มาจากตาราง ชื่อ field คือ Picsurv1 เป็นที่เก็บ path ของรูป C:\Documents and Settings\User\My Documents\untitled1.bmp
และ Frame Image ชื่อ fme1 ซึ่งต้องการให้ แสดงรูปภาพใน Frame จาก path ที่ text box
ผมเขียน code เพื่อให้ แสดงรูป แต่มัน debug ที่บรรทัด if isnull เลยครับ
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error Resume Next
If IsNull(Me.txtpic1, "") = "" Then
Me.fme1.Picture = ""
Me.fme1.Visible = False
ElseIf Dir(Me.txtpic1) = "" Then
Me.fme1.Picture = ""
Me.fme1.Visible = False
Else
Me.fme1.Picture = Me.txtpic1
Me.fme1.Visible = True
End If
End Sub
				2 Reply in this Topic. Dispaly 1  pages and you are on page number 1 
				
        
    2 @R10537    
        
    
      ขอบคุณครับ จะลองแก้ไขดู    
    
  
      Time: 0.0850s
    
      
		
เข้าใจว่าเป็นฟังก์ชั่น Nz( ) ซะมากกว่านะครับ