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
 

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

Similar Threads

Form filter problem 3
filter on dates 2
me.filter small problem 1
Creating a filter using VBA 5
Runtime error 2001 2
Filter a Continuous Form using a Drop-Down Box 8
Option group to filter a form 5
Coding 4

Top