Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2004
    Posts
    14

    Unanswered: String Matching Problem

    Hi!

    I want to create report based on query criteria.
    This criteria is the unbound text value which is a part of field data.

    For that I use Like operator with %.But it shows no data in report.

    How to overcome this problem?

    Subho

  2. #2
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    Access uses * instead of %
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Are you in access or MSSQL.

    As r123456 is pointing out, Jet-SQL and T-SQL use different characters for the "wildcard".
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by r123456
    Access uses * instead of %
    NOT QUITE RIGHT ... Access actually uses BOTH ... The QBE uses the asterisk. VBA requires the use of the percent sign (SQL) ...
    Back to Access ... ADO is not the way to go for speed ...

  5. #5
    Join Date
    Jun 2004
    Posts
    96
    is that so?? I've been using * for all of my projects in access.. on query or vba..
    "%" doesn't work for me in access..

  6. #6
    Join Date
    Jun 2004
    Posts
    14

    Same problem with string matching

    Hi!

    The problem lies elsewhere not it be '*' or '%'. I am using both the things separately as quey criteria but it shows the same text as I put it in the Report Nodata handler.

    I want to pick up single word which user should type in the unbound text box.
    Field data type is memo. It has some datas. Search operation is on this field.
    Result shows in the report.

    I put query on the controlsource of the report. This query contains this criteia
    on that particular field.

    ex - Like '%[Forms]![TmasterForm]![Disease]%'

    Like '*[Forms]![TmasterForm]![Disease]*'

    Like '*' & '[Forms]![TmasterForm]![Disease]' & '*'

    Like "'*' & '[Forms]![TmasterForm]![Disease]' & '*'"

    all are fails.

    Now I how to proceed?
    Subho

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    cheat:

    make yourself another textbox on the form (.visible = no) and set it to
    "*" & [Forms]![TmasterForm]![Disease] & "*"
    ...then use this hidden box in your criteria

    Like [Forms]![TmasterForm]![HiddenTextBox]

    ?? izy
    currently using SS 2008R2

  8. #8
    Join Date
    Jun 2004
    Posts
    14

    Subho congratulate all the members of dbforum

    Thank u very much izyrider.

    The problem is solved with ur kind help.

    I need long term relation with u like people and also thanks to dbforum who give me chance to do this.

    Wish u all the best and success to every walk of life.

    Subho

  9. #9
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Quote Originally Posted by Subhajit Bose
    Thank u very much izyrider.

    The problem is solved with ur kind help.

    I need long term relation with u like people and also thanks to dbforum who give me chance to do this.

    Wish u all the best and success to every walk of life.

    Subho
    Sounds like you have a fanclub Izy.

    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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