Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ADODB Recordset Find error

Posted on 2002-04-08
2
Medium Priority
?
230 Views
Last Modified: 2011-10-03
Hello

I have the following situation, i have a disconnected recordset. and now in my client i want to search for a specific item.
It works fine but when i have a ' in my string it isn't working. thats ofcourse because of the ' in the string.
my code is the following

value = "it's a test"

RS.Find("field = '" & value & "'")

How can i solve my problem, is there an escape charater for this problem.

greetingz Paul
0
Comment
Question by:pvandelouw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 120 total points
ID: 6925320
Just double the ' character:

RS.Find "Field = '" & Replace(Value,"'","''") & "'"

0
 

Author Comment

by:pvandelouw
ID: 6926052
thank you very much, and really quick too. thanks

greetingz paul
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question