Re: need similar solution to "cascading combos"...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"David J. Smith" <DavidJSmith@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote

I'm creating a search form w/ unbound combo boxes
that create a filter on the subform. Can I use the filtered
view of the subform as the starting point for my query?
Like clone that recordset and reference it in code from
the combo boxes? I'm a newbie in Access so don't know
VB well enough mess around with recordsets in code yet.

The answer to your basic question is "No, you cannot set the RowSource of a
ComboBox to a Recordset." You can set the Row Source to a Table, a Query,
or a Value List.

However, if you would try to not be so "generic" in your description,
perhaps someone could offer a useful suggestion. Unless you fear that you
are going to reveal a trade secret or confidential data, tell us what data
you have, how it is laid out in tables, and what you are trying to
accomplish.

Also "Filter" is a very specific term in Access, and I think you are using
that in a generic sense, as well. If you were actually using Access' Filter
feature, the solution would likely be different than what you'll need to do
to with Combo Boxes.

What you've described so far is _how_ you want to do something, and you want
to do it in a way that you can't do in Access. But, almost certainly, if
the data content is limited based on one or more Combo Boxes, you _can_
restrict later choices to the already-selected subset... if, indeed, that is
what you want to do. Others, and I, do that frequently.

This may, indeed, be easy to accomplish in Delphi, but Delphi is a
programming language, not a database -- so there'll be more to the "Delphi
environment" than just Delphi, and, AFAIK, there's nothing like Access'
flavor of Combo Boxes available to Delphi. It was possible in classic VB to
emulate the AutoExpand feature of Access Combo Boxes, but it took some
programming to do so -- programming not needed in Access. And, as we say to
many who want Access to be, or to work like, some tool they've used before,
that kind of expectation can lead to nothing but frustration.

We wold really like to be of help, but we need more specific information
than what you provided. Perhaps having the answer to that basic question
will get the discussion "off dead center."

Larry Linson
Microsoft Access MVP


.



Relevant Pages

  • RE: need similar solution to "cascading combos"...
    ... if there were some way to use the subForm recordset in my ... boxes, I used several unbound combo boxes for Customer Name, Product Name, ... there's no filter applied. ...
    (microsoft.public.access.forms)
  • RE: need similar solution to "cascading combos"...
    ... that) as the basis of a query. ... Is there a way in code to access the subform's recordset in a query. ... This will cause Combo2 to filter it's data based on the value in Combo1 ... boxes, I used several unbound combo boxes for Customer Name, Product Name, ...
    (microsoft.public.access.forms)
  • Re: need similar solution to "cascading combos"...
    ... I learned from Delphi programming that if I sniff around, ... > I'm creating a search form w/ unbound combo boxes ... Also "Filter" is a very specific term in Access, and I think you are using ... programming language, not a database -- so there'll be more to the "Delphi ...
    (microsoft.public.access.forms)
  • RE: need similar solution to "cascading combos"...
    ... that) as the basis of a query. ... Is there a way in code to access the subform's recordset in a query. ... This will cause Combo2 to filter it's data based on the value in Combo1 ... boxes, I used several unbound combo boxes for Customer Name, Product Name, ...
    (microsoft.public.access.forms)
  • Re: need similar solution to "cascading combos"...
    ... That's not quite the same as setting it to a recordset, but the values are, ... I learned from Delphi programming that if I sniff around, ... > I'm creating a search form w/ unbound combo boxes ... Also "Filter" is a very specific term in Access, ...
    (microsoft.public.access.forms)