老大早上好,看我的代码:
Private Sub txt_PartPhotoPath_AfterUpdate()
' 在选择了一个部品照片后,显示照片.
On Error Resume Next
'If (IsRelative(Me!txt_PartPhotoPath) = True) Then
' Me![img_PartPhoto].Picture = path & Me![txt_PartPhotoPath]
'Else
'Me![img_PartPhoto].Picture = Me![txt_PartPhotoPath]
'Me![img_PartPhoto].Picture = ""
'End If
If Me![txt_PartPhotoPath].Value = Null Then
Me![img_PartPhoto].Picture = ""
Else
Me![img_PartPhoto].Picture = Me![txt_PartPhotoPath]
Me!txt_PartPhotoPath.Requery
Me!img_PartPhoto.Requery
Me.Requery
End If
效果还是一样啊,不知道什么原因,请再指教一下啊,多谢了