Vba MS访问更改事件未触发

Vba MS访问更改事件未触发,vba,events,ms-access,Vba,Events,Ms Access,我正在运行下面的更改事件以填充标准联系人信息。当我从下拉菜单中选择一个名称时,这种方法效果很好。然而,很多时候我只是开始键入帐户以找到正确的帐户,因为它比滚动帐户列表要快。但是,当我用tab键或单击下一个字段时,它不会识别更改,也不会触发。我错过了什么 Private Sub cboAccountID_Change() ' Adds Account info to invoice Invoice_To = DLookup("Invoice_To", "tblClientLists", "

我正在运行下面的更改事件以填充标准联系人信息。当我从下拉菜单中选择一个名称时,这种方法效果很好。然而,很多时候我只是开始键入帐户以找到正确的帐户,因为它比滚动帐户列表要快。但是,当我用tab键或单击下一个字段时,它不会识别更改,也不会触发。我错过了什么

Private Sub cboAccountID_Change()
' Adds Account info to invoice
    Invoice_To = DLookup("Invoice_To", "tblClientLists", "AccountID =" & Forms![frmInvoices]!AccountID)
    Invoice_Email = DLookup("Invoice_Email", "tblClientLists", "AccountID =" & Forms![frmInvoices]!AccountID)
    Service_Type = DLookup("Service_Type", "tblClientLists", "AccountID =" & Forms![frmInvoices]!AccountID)
    Client_Rate = DLookup("Client_Rate", "tblClientLists", "AccountID =" & Forms![frmInvoices]!AccountID)
    Address = DLookup("Address", "tblClientLists", "AccountID =" & Forms![frmInvoices]!AccountID)
    Unit_Suite = DLookup("Unit_Suite", "tblClientLists", "AccountID =" & Forms![frmInvoices]!AccountID)
    City = DLookup("City", "tblClientLists", "AccountID =" & Forms![frmInvoices]!AccountID)
    State = DLookup("State", "tblClientLists", "AccountID =" & Forms![frmInvoices]!AccountID)
    Zip = DLookup("Zip", "tblClientLists", "AccountID =" & Forms![frmInvoices]!AccountID)

我认为,因为你在打字,你实际上没有改变/提交任何东西。因此,代码必须从

表单![frmInvoices]!帐户ID

表单![frmInvoices]!AccountID.Text


(我不确定键入时查找会有什么反应。)

您是否尝试过在更新后使用
事件而不是在更改时使用
?@GordThompson我使用了更新后事件,它工作得非常好。谢谢实际上,当在组合框中键入时,它的
On Change
事件会为您键入的每个字符触发。好的,这很好,应该是这样的。只是不确定在数据不完整的情况下,查找会有什么反应。应该可以,只是在输入有用的东西之前不会返回任何东西,我想。