|
以下一段代碼本想當窗體中combo46輸入量產新開或量產重開時跳出對話框, 檔選擇"是"時備注欄自動標于轉量產,combo48行來源重新執行查詢查出對應樣品編號,不過現在出現備注欄中沒無法達到自動標注的功能,不知代碼錯在哪里, 剛接触vba請指教
Private Sub Combo46_AfterUpdate()
Dim yesno As Integer
Me.量_樣.Value = DLookup("[模類分類]", "模類表", "[模類]='" & Me.Combo46.Value & "'")
If ((Me.Combo46 = "量產新開") Or (Me.Combo46 = "量產重開")) Then
If (MsgBox("此型體是否為原樣品轉量產?", 4) = 1) Then
Me.備注.Value = "轉量產"
Me.Combo48.RowSource = "SELECT 模具進度日報表.客戶編號, 模具進度日報表.鞋廠 FROM 模具進度日報表 WHERE (((模具進度日報表.客戶編號)=Forms!進度修改查詢!客戶編號) And ((模具進度日報表.鞋廠)=Forms!進度修改查詢!鞋廠))"
Else
Me.Combo48.Value = ""
End If
End If
End Sub
|
|