vba like

G

Grimwadec

ElseIf Me.FitSize.RowSource = "Like *,*" Then

is the code I wrote in attempt to get the code to recognise where RowSource
equals say "Ladies,Mens", also tried [] around the comma

of course it doesn't work because I don't have a clue as to how to include a
Like operator in VBA. Help please
 
J

Jack Leach

I think you're going to need to include that in an SQL statement to return
any results...

Me.FitSize.Rowsource = _
"SELECT * FROM tablename " & _
"WHERE [field] LIKE ""*,*"""

I'm not 100% sure on that syntax but it's closer than what you have at the
moment.

hth

--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
G

Grimwadec

ah, so Like really means =Like...thanks, so simple really!
--
Grimwadec


Dale Fye said:
Grim,

Try:

Elseif me.FitSize.Rowsource Like "*,*" Then


----
HTH
Dale



Grimwadec said:
ElseIf Me.FitSize.RowSource = "Like *,*" Then

is the code I wrote in attempt to get the code to recognise where RowSource
equals say "Ladies,Mens", also tried [] around the comma

of course it doesn't work because I don't have a clue as to how to include a
Like operator in VBA. Help please
 

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