Please help with sql, macro or function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul

    #1

    Please help with sql, macro or function

    let say i have a table with a field called "fullName" wherein encoders
    can type a persons full name (i.e. "Paul Mangaser", "Chris Torres
    Jr.", "Amelie T. Mauresmo", Andy B Rodick").

    i want to create a form with a field called "Search String". a user
    then types in 1 or more strings and this will search the "fullName" in
    the table and display any matches.

    Eaxample, TABLE1 has the following entries: "Paul Abrilla", "Paul
    Manangon", "Amie Torres", "Chris Abrilla", "Nilo T Abrilla".

    in FORM1 a user types in "Abrilla" in the "Search String" field and
    hit enter. the following records will be displayed or listed: "Paul
    Abrilla", "Chris Abrilla", "Nilo T Abrilla". If user types in "Paul",
    "Paul Abrilla" & "Paul Manangon" will be displayed. If user types in
    "Paul Abrills" only one record will be displayed.

    Can SQL do this in ms-access. Is there an SQL function, operator,
    clause i can use that will perform this task? Is there a macro I can
    use that will perform this task? You can email me directly at
    pcma10019@yahoo .com. Thanks in advance. Any ideas or hellp will be
    appreciated.

    Paul
  • Ken Snell

    #2
    Re: Please help with sql, macro or function

    Query would look something like this:

    SELECT fullName FROM TableName
    WHERE fullName Like "*" &
    [Forms]![FormName]![Search String] & "*";

    --

    Ken Snell
    <MS ACCESS MVP>

    "Paul" <pcma10019@yaho o.com> wrote in message
    news:78cbf985.0 409231857.256bd 93a@posting.goo gle.com...[color=blue]
    > let say i have a table with a field called "fullName" wherein encoders
    > can type a persons full name (i.e. "Paul Mangaser", "Chris Torres
    > Jr.", "Amelie T. Mauresmo", Andy B Rodick").
    >
    > i want to create a form with a field called "Search String". a user
    > then types in 1 or more strings and this will search the "fullName" in
    > the table and display any matches.
    >
    > Eaxample, TABLE1 has the following entries: "Paul Abrilla", "Paul
    > Manangon", "Amie Torres", "Chris Abrilla", "Nilo T Abrilla".
    >
    > in FORM1 a user types in "Abrilla" in the "Search String" field and
    > hit enter. the following records will be displayed or listed: "Paul
    > Abrilla", "Chris Abrilla", "Nilo T Abrilla". If user types in "Paul",
    > "Paul Abrilla" & "Paul Manangon" will be displayed. If user types in
    > "Paul Abrills" only one record will be displayed.
    >
    > Can SQL do this in ms-access. Is there an SQL function, operator,
    > clause i can use that will perform this task? Is there a macro I can
    > use that will perform this task? You can email me directly at
    > pcma10019@yahoo .com. Thanks in advance. Any ideas or hellp will be
    > appreciated.
    >
    > Paul[/color]


    Comment

    • Paul

      #3
      Re: Please help with sql, macro or function

      Thanks for the reply. I kind of figure it out after browsing the
      group. Thank you very much

      Comment

      Working...