I have a list box of company names and i need to populate a text box with the corresponding value from the usage field.
my table is named Average. the fields are Customer and Usage. i used this code in the AfterUpdate event of the list box. i cannot get the text box to populate.here is the code
my table is named Average. the fields are Customer and Usage. i used this code in the AfterUpdate event of the list box. i cannot get the text box to populate.here is the code
Code:
Private Sub Cust_ListS_AfterUpdate()
With Me
.txt_AvgS = DLookup(Expr:="[Usage]", _
Domain:="[Average]", _
Criteria:="[Customer] = '" & .Cust_ListS & "'")
End With
End Sub
Comment