I've already looked through a bunch of threads dealing with dlookup...alot of them have helped but I'm still coming up with this error: #name?
I have a form based off of an invoice table. I have a combo box that looks up a customer.
cmbCustomer:
Column(1) = CustomerID
Column(2) = CustomerName
Column(3) = TaxCode
I want to have a text box that uses the TaxCode from cmbCustomer (3rd column) and reference's the tax table to lookup up the actual tax rate. I want this tax rate to display in a textbox.
this is what I have:
control source for txtTax: =
I tried using this same lookup with the criteria hard-coded (making "[TaxCode]= 'CA'") and it worked, so I know it's looking at the table...there must be something wrong with my reference to the combo box. Can anyone tell me what it is?
Sandy
I have a form based off of an invoice table. I have a combo box that looks up a customer.
cmbCustomer:
Column(1) = CustomerID
Column(2) = CustomerName
Column(3) = TaxCode
I want to have a text box that uses the TaxCode from cmbCustomer (3rd column) and reference's the tax table to lookup up the actual tax rate. I want this tax rate to display in a textbox.
this is what I have:
control source for txtTax: =
Code:
DLookUp("[TaxRate]","[Tax Table]","[TaxCode]= '" & Me!cmbCustomer.Column(3) & "'")
I tried using this same lookup with the criteria hard-coded (making "[TaxCode]= 'CA'") and it worked, so I know it's looking at the table...there must be something wrong with my reference to the combo box. Can anyone tell me what it is?
Sandy