Search Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

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.
 
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top