Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run-time error 438 1

Status
Not open for further replies.

neronikita

Technical User
Feb 20, 2002
159
US
Good morning,

I am getting a run-time error '438' Object doesn't support this property or method when I click on my button.

Here is my code:


Private Sub searchname_Click()
Me.Filter = "[customername] LIKE " & Me.searchname
Me.FilterOn = True
Me.Requery

End Sub

customername is the database field name, and searchname is the unbound text field where they enter the criteria.

I've been researching this and have tried everything I could think of, so I thought maybe a fresh pair of eyes would help. I am using SQL Server 2008 and Access 2007 in an access data project.

Thanks in advance,

Di
 

Perhaps
Code:
Me.Filter = "[customername] LIKE [b][red]'[/red][/b]" & Me.searchname [b][red]& "'"[/red][/b]



Randy
 
Thanks. It has been ages since I've worked with Access (since 2000) and everything seems so different. Guess I'm a little rusty. That worked.

Thanks again,

Di
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top