Re: Cascading combo boxes
- From: "BillD" <BillD@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 9 May 2005 18:47:15 -0700
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?
> >
> >
> >
.
- References:
- Cascading combo boxes
- From: BillD
- Re: Cascading combo boxes
- From: Douglas J. Steele
- Re: Cascading combo boxes
- From: BillD
- Re: Cascading combo boxes
- From: Van T. Dinh
- Re: Cascading combo boxes
- From: Bill D
- Re: Cascading combo boxes
- From: Van T. Dinh
- Re: Cascading combo boxes
- From: BillD
- Cascading combo boxes
- Prev by Date: Re: combo selection help!!
- Next by Date: Error
- Previous by thread: Re: Cascading combo boxes
- Next by thread: Cascading Combo Boxes
- Index(es):
Relevant Pages
|