Filter syntax problems

T

Ticotion

Hi

I need to filter a form using a two comboboxes ones containing dates and
another containing a name. I use the following code but can't ge the syntax
right.

Me.Filter = "[Line] = " & Me.combo144& " And [Datem]=#" & Me.combo136 & "#"
Me.FilterOn = True

Please Help

Ticotion
 
R

RonaldoOneNil

The combo box containing a name is text so you need top enclose it in single
quotes
"[Line] = '" & Me.combo144& "' And [Datem]=#" & Me.combo136 & "#"
 
T

Ticotion

thank you. That worked

/Ticotion

RonaldoOneNil said:
The combo box containing a name is text so you need top enclose it in single
quotes
"[Line] = '" & Me.combo144& "' And [Datem]=#" & Me.combo136 & "#"

Ticotion said:
Hi

I need to filter a form using a two comboboxes ones containing dates and
another containing a name. I use the following code but can't ge the syntax
right.

Me.Filter = "[Line] = " & Me.combo144& " And [Datem]=#" & Me.combo136 & "#"
Me.FilterOn = True

Please Help

Ticotion
 
Top