Results 1 to 3 of 3

Thread: Spaces

  1. #1
    Tinger Guest

    Default Spaces

    Question for y&#039all.<BR><BR>I have a search form that does not work when the string has spaces. Example,<BR><BR>In the database is stored ABCD 1234 (space between D and 1). If I search for ABCD, it finds ABCD 1234, and ABCD 2345, and... etc.<BR><BR>However, if I search ABCD 1234, it says it is not found.<BR><BR>Suggestions anyone?

  2. #2
    Join Date
    Dec 1969

    Default RE: Spaces

    what if you used the replace() function on your search text as well as your data fields? Try something like this<BR>searchString = replace(searchString , " ", "_")<BR>If InStr(1, searchString, Replace(rs(fieldname), " ", "_") &#060;&#062; 0 Then<BR>&#039we&#039ve got a match<BR>Else<BR> &#039no match<BR>End If<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Spaces

    Show me the code (htm and sql)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts