Create a function to replace apostrophe with double apostrophe. This is the
way I do it..
Function SafeQuote(ByVal strQuote As String) As String
SafeQuote = Replace(strQuote, "'", "''")
End Function
ex.
Ado_Rs.Find "Lastname = '" & SafeQuote(txtLastname.txt) & "'"
Jominix
_____
From: HouseDad [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 2:27 AM
To: [email protected]
Subject: [vbhelp] Searching for apostrophe's...
Got a problem!
I have to check a DB to see if a record is a duplicate. The main
thing I am checking is first and last name. These name often have
apostrophe's!!!! How in the world am I going to use findfirst or
seek this way?
The only thing I can think of is to write a program to substitute
them for another character before searching, then change them back.
This database has a lot of records, probably going to be about 500k.
Any ideas?
Chris
'// =======================================================
Rules : http://ReliableAnswers.com/List/Rules.asp
Home : http://groups.yahoo.com/group/vbHelp/
=======================================================
Post : [email protected]
Join : [EMAIL PROTECTED]
Leave : [EMAIL PROTECTED]
'// =======================================================
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/vbhelp/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
'// =======================================================
Rules : http://ReliableAnswers.com/List/Rules.asp
Home : http://groups.yahoo.com/group/vbHelp/
=======================================================
Post : [email protected]
Join : [EMAIL PROTECTED]
Leave : [EMAIL PROTECTED]
'// =======================================================
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/vbhelp/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/