Filter syntax

K

Kirk P.

I'm building a filter based on criteria from a form. I can't get the syntax
right.

Here's what I've got.

strWhere = "[HR_SUPERVISOR2] Like " & """ & Me.cboSupv2 & " * ""

I'm trying to get HR_SUPERVISOR2 Like "Anders, Donald*" - with Anders,
Donald supplied by cboSupv2. Help!
 
M

Marshall Barton

Kirk said:
I'm building a filter based on criteria from a form. I can't get the syntax
right.

Here's what I've got.

strWhere = "[HR_SUPERVISOR2] Like " & """ & Me.cboSupv2 & " * ""

I'm trying to get HR_SUPERVISOR2 Like "Anders, Donald*" - with Anders,
Donald supplied by cboSupv2. Help!


Tyr this:

strWhere = "[HR_SUPERVISOR2] Like """ & Me.cboSupv2 & "*"""
 
K

Kirk P.

That did it. Thanks!

Marshall Barton said:
Kirk said:
I'm building a filter based on criteria from a form. I can't get the syntax
right.

Here's what I've got.

strWhere = "[HR_SUPERVISOR2] Like " & """ & Me.cboSupv2 & " * ""

I'm trying to get HR_SUPERVISOR2 Like "Anders, Donald*" - with Anders,
Donald supplied by cboSupv2. Help!


Tyr this:

strWhere = "[HR_SUPERVISOR2] Like """ & Me.cboSupv2 & "*"""
 

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