DCount Problem

  • Thread starter Thread starter Aziz
  • Start date Start date
A

Aziz

I want to place a value in a text box on a form based on
the values of 2 combo boxes on the same form. Here's what
I have

Me.txtTA = DLookup("[Tyre Application]", "tblTyre Chart
2001", "[Vehicle Type] = " & "'" & Me.cboVT & "'"
And "[Rim Size] = " & "'" & Me.cboRS & "'")

If I use [Vehicle Type] or [Rim Size] on their own I get
the correct result, but not when I try to use both
conditions.

I get Error 13, type mismatch? All fields are text.
 
Your quotes around [Rim Size] are wrong. Try:

Me.txtTA = DLookup("[Tyre Application]", "tblTyre Chart
2001", "[Vehicle Type] = " & "'" & Me.cboVT & "'
And [Rim Size] = '" & Me.cboRS & "'")
 
Back
Top