Option Compare Database
Private Sub 外协类别_AfterUpdate()
On Error GoTo Err_ProductID_AfterUpdate
Dim strFilter As String
strFilter = "[款式名称ID] = " & Me!外协类别
Me!外协单价 = DLookup("[外加工费]", "款式名称", strFilter)
Exit_ProductID_AfterUpdate:
Exit Sub
Err_ProductID_AfterUpdate:
MsgBox Err.Description
Resume Exit_ProductID_AfterUpdate
End Sub