Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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
    >
    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page