Solved

ADODB Recordset Find error

Posted on 2002-04-08
2
226 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 40 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

751 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