Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Search Question

Discussion in 'Information Technology' started by CoachBarkerOJPW, Jul 28, 2006.

  1. CoachBarkerOJPW

    CoachBarkerOJPW
    Expand Collapse
    Guest

    I have a form with 22 fields, text and combo boxes. I would like a way to
    search the form for First name and Last name that will only return the values
    entered. I can do this in .net by setting a criteria and the field to search,
    but can't figure it out for VBA. Any help would gretly be appreciated. I am
    using the default search now but it does not work the way I would like it to.
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Indian American Couple Donates For Sikh, Punjabi Culture Research In US Breaking News Aug 19, 2016
    Soul Search By Swarn Singh Bains Book Reviews & Editorials May 25, 2016
    Harpal Singh Kumar Cancer Researcher Knighted By Queen Elizabeth II Sikh Personalities Jan 5, 2016
    Movies Ashdoc's Movie Review---dozakh In Search Of Heaven ( 2015 ) Theatre, Movies & Cinema Apr 6, 2015
    Research Shows NFL Quarterbacks Play Better With Beards Business, Lifestyle & Leisure Nov 23, 2014

  3. Larry Linson

    Larry Linson
    Expand Collapse
    Guest

    "CoachBarkerOJPW" wrote

    > I have a form with 22 fields, text and combo boxes. I would like a way to
    > search the form for First name and Last name that will only return the

    values
    > entered. I can do this in .net by setting a criteria and the field to

    search,
    > but can't figure it out for VBA. Any help would gretly be appreciated. I

    am
    > using the default search now but it does not work the way I would like it

    to.

    The simple approach is to create an unbound Combo Box and let the Wizard do
    the work for you... that works for just one Field.

    With a little effort, however, you can extend that so that selecting the
    Last Name displays in another Combo Box only the First Names associated with
    that particular Last Name. There's an article, explaining this in detail, at
    http://www.mvps.org/access/forms/frm0028.htm.

    And, since you mention .NET, I suspect plain ol' VBA holds no terror for
    you. It just requires a little different "world view." (That is, in .NET,
    everything's an "object," even your variables; in VBA, you do most of your
    work with objects that Access provides, or with "things" that aren't
    objects.)

    Larry Linson
    Microsoft Access MVP
     
  4. CoachBarkerOJPW

    CoachBarkerOJPW
    Expand Collapse
    Guest

    Thanks for the reply, I did find a way to use a combo box using a query to
    concactenate the First name and Last name so all the names are listed in the
    combo box. Click on the name and it takes you to the correct record.
    Unfortunately haven't done much in VBA in the last two years at school, most
    coding classes are now aimed at OOP.

    "Larry Linson" wrote:

    >
    > "CoachBarkerOJPW" wrote
    >
    > > I have a form with 22 fields, text and combo boxes. I would like a way to
    > > search the form for First name and Last name that will only return the

    > values
    > > entered. I can do this in .net by setting a criteria and the field to

    > search,
    > > but can't figure it out for VBA. Any help would gretly be appreciated. I

    > am
    > > using the default search now but it does not work the way I would like it

    > to.
    >
    > The simple approach is to create an unbound Combo Box and let the Wizard do
    > the work for you... that works for just one Field.
    >
    > With a little effort, however, you can extend that so that selecting the
    > Last Name displays in another Combo Box only the First Names associated with
    > that particular Last Name. There's an article, explaining this in detail, at
    > http://www.mvps.org/access/forms/frm0028.htm.
    >
    > And, since you mention .NET, I suspect plain ol' VBA holds no terror for
    > you. It just requires a little different "world view." (That is, in .NET,
    > everything's an "object," even your variables; in VBA, you do most of your
    > work with objects that Access provides, or with "things" that aren't
    > objects.)
    >
    > Larry Linson
    > Microsoft Access MVP
    >
    >
    >
     

Share This Page