Re: Cascading combo boxes



Can't seem to get the combo boxes working properly. Will keep trying. Would
help if I knew what I was doing.

"BillD" wrote:

> Thanks for the detailed description. I should be able to understand the
> procedure after I work with it.
>
> "Van T. Dinh" wrote:
>
> > The article actually explain 2 different scenarios. The first scenario is
> > up and including the code sample in blue background. The article did mean
> > the Table "Categories" from the sample database "NorthWind" that comes with
> > your Access software.
> >
> > The second senario is what you wanted.
> >
> > Se the RowSource Type of the combo2 to "Table / Query" and set the RowSource
> > to an SQL String, something like:
> >
> > SELECT [LastName] & ", " & [FirstName]
> > FROM [YourTable]
> > WHERE [LastName] Like Forms!YourForm!combo1 & "*"
> >
> > and the use the code at the end of the article.
> >
> > Notes:
> > =====
> > 1. Replace names above with appropriate names for your Table / Field / Form
> > / Controls.
> >
> > 2. The reference
> >
> > Forms!YourForm!combo1
> >
> > is the Parameter in the Query / SQL String which doesn't have a value until
> > you select a character in the ComboBox. Hence, you need to requery the
> > combo2 after you select a value in combo1.
> >
> > 3. The WHERE clause in the SQL String above specify that only Records with
> > [LastName] starting with whatever the character selected in combo1 will be
> > selected into the list for combo2.
> >
> > --
> > HTH
> > Van T. Dinh
> > MVP (Access)
> >
> >
> >
> > "Bill D" <anonymous@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > news:087c01c550a5$0b11f7c0$a601280a@xxxxxxxxxx
> > > I am trying to set up the combos from the article you
> > > referred me to.It states that the RowSource of Combo1 is
> > > set to a Table Category. I think that they mean Table
> > > Field. In the second to the last Paragraph they ask you to
> > > issue a requery on combo2 in combo1's control AfterUpdate
> > > event. Problem-Combo1 already has an event in the
> > > AfterUpdate event. I am not a programmer. I cannot
> > > understand how this can work. Something seems to be
> > > missing.
> > > Summary of what could work:
> > > 1) NewTable say called NameSearchAlpha has the 26 letters
> > > of the alphabet in a field called Alpha.
> > > 2) Combo1 RowSourceType should be set to Table/Query.
> > > RowSource should be set to Alpha field in Table
> > > NameSearchAlpha. AfterUpdate event in Combo1 is to include
> > > the code for Privare Sub Combo1 AfterUpdate.
> > > So far this is what we have. When I select combo1 on
> > > the ConstituentsForm and select the dropdown list I have
> > > all 26 letters of the alphabet.
> > > 3) The next step would be to create the NameSearchQuery.
> > > The query would have fields LastName, FirstName,and
> > > MiddleName from the ConstituentsTable. The Query is to use
> > > combo1's value as a parameter. Where is the parameter
> > > placed? Field, Table or Criteria of the NameSearchQuery.
> > > Where do I go from here?
> >
> >
> >
.



Relevant Pages

  • RE: how to change a query to use a different table through code
    ... users that may be logged in to the terminal server and using the frontend. ... front end that is universal for each user, and the ability to base a query ... little bit quicker than running a dynamic sql string. ...
    (microsoft.public.access.modulesdaovba)
  • RE: how to change a query to use a different table through code
    ... I've never had to work with a terminal server and don't know ... front end that is universal for each user, and the ability to base a query ... little bit quicker than running a dynamic sql string. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Translation of SQL for VBA
    ... Not knowing what the criteria are in the SQL string, ... > Append Query. ... >> Dim strSQL as String ...
    (microsoft.public.access.modulesdaovba)
  • Re: Retrieving data from user input.
    ... I ran the query by itself to test ... "Carl Rapson" wrote: ... What does your SQL string look like in the Immediate window? ... I used my control name instead of the 'txtPro_ID' but still nothing ...
    (microsoft.public.access.formscoding)