Private Sub CmdPartInforDelete_Click()
On Error GoTo Err_CmdPartInforDelete_Click
If Nz(Me![PartInformation_ChildForm]![txt_PartType]) <> "" Then
CurrentDb.Execute "delete from tbl_PartInformation where 型式=" & Nz(Me![PartInformation_ChildForm]![txt_PartType])
PartInformation_ChildForm.Form.Requery
Me.Requery
End If
MsgBox "okokokok"
Exit_CmdPartInforDelete_Click:
Exit Sub
Err_CmdPartInforDelete_Click:
MsgBox Err.Description
Resume Exit_CmdPartInforDelete_Click
End Sub
老大早上好,看我的代码:
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
效果还是一样啊,不知道什么原因,请再指教一下啊,多谢了