DCount Problem

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.
 
D

Douglas J. Steele

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 & "'")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top