PC Review


Reply
Thread Tools Rate Thread

Cascading combo boxes - are they able to do this?

 
 
Joe
Guest
Posts: n/a
 
      19th Apr 2010
I would like to set up a form containing a combo box with a list of
mechanisms of injury. Some mechanisms have sub groups that I would like to
have visible by means of linking them with a cascading combo box. Is it
possible to have only some records from Cbo 1 link to Cbo 2? The examples I
have seen to date show cascading data for all records in the first combo ie
the city/state or postcode/suburb examples where every record has a sub
record.

Thanks for your help.
--
Joe
 
Reply With Quote
 
 
 
 
Al Campagna
Guest
Posts: n/a
 
      19th Apr 2010
Joe,
If I understand correctly, you initially show just the first combo
(ex. cboInjury), and on the AfterUpdate of cboInjury, if the selected
value has an associated SubInjury choice/choices... then make make
cboSubInjury visible and updateable.
You'd also have to add the same determination code to the record's
OnCurrent event, so cboSubInjury would show/not show according to the
cboInjury value.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


"Joe" <(E-Mail Removed)> wrote in message
news:F017DAC0-D5F2-4B77-8721-(E-Mail Removed)...
>I would like to set up a form containing a combo box with a list of
> mechanisms of injury. Some mechanisms have sub groups that I would like
> to
> have visible by means of linking them with a cascading combo box. Is it
> possible to have only some records from Cbo 1 link to Cbo 2? The examples
> I
> have seen to date show cascading data for all records in the first combo
> ie
> the city/state or postcode/suburb examples where every record has a sub
> record.
>
> Thanks for your help.
> --
> Joe



 
Reply With Quote
 
KARL DEWEY
Guest
Posts: n/a
 
      19th Apr 2010
>>You'd also have to add the same determination code to the record's
OnCurrent event, so cboSubInjury would show/not show according to the
cboInjury value.
Why not have a field in combo1's source table to indicate sub or not -
Yes/No field.

--
Build a little, test a little.


"Al Campagna" wrote:

> Joe,
> If I understand correctly, you initially show just the first combo
> (ex. cboInjury), and on the AfterUpdate of cboInjury, if the selected
> value has an associated SubInjury choice/choices... then make make
> cboSubInjury visible and updateable.
> You'd also have to add the same determination code to the record's
> OnCurrent event, so cboSubInjury would show/not show according to the
> cboInjury value.
> --
> hth
> Al Campagna
> Microsoft Access MVP 2007-2009
> http://home.comcast.net/~cccsolutions/index.html
>
> "Find a job that you love... and you'll never work a day in your life."
>
>
> "Joe" <(E-Mail Removed)> wrote in message
> news:F017DAC0-D5F2-4B77-8721-(E-Mail Removed)...
> >I would like to set up a form containing a combo box with a list of
> > mechanisms of injury. Some mechanisms have sub groups that I would like
> > to
> > have visible by means of linking them with a cascading combo box. Is it
> > possible to have only some records from Cbo 1 link to Cbo 2? The examples
> > I
> > have seen to date show cascading data for all records in the first combo
> > ie
> > the city/state or postcode/suburb examples where every record has a sub
> > record.
> >
> > Thanks for your help.
> > --
> > Joe

>
>
> .
>

 
Reply With Quote
 
Al Campagna
Guest
Posts: n/a
 
      20th Apr 2010
Karl,
I had in mind two colums in cbo1...
Injury SubInjury

AfterUpdate... is cbo1.Column(1) = Null then...

OnCurrent... is cbo1.Column(1) = Null then...

If I understand you correctly... seems as though a T/F in cbo1 would be
pretty much the same thing.
Mine is just one of many possible "flavors" of a solution.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


"KARL DEWEY" <(E-Mail Removed)> wrote in message
news:BD4358B5-1F26-49A2-B410-(E-Mail Removed)...
>>>You'd also have to add the same determination code to the record's

> OnCurrent event, so cboSubInjury would show/not show according to the
> cboInjury value.
> Why not have a field in combo1's source table to indicate sub or not -
> Yes/No field.
>
> --
> Build a little, test a little.
>
>
> "Al Campagna" wrote:
>
>> Joe,
>> If I understand correctly, you initially show just the first combo
>> (ex. cboInjury), and on the AfterUpdate of cboInjury, if the selected
>> value has an associated SubInjury choice/choices... then make make
>> cboSubInjury visible and updateable.
>> You'd also have to add the same determination code to the record's
>> OnCurrent event, so cboSubInjury would show/not show according to the
>> cboInjury value.
>> --
>> hth
>> Al Campagna
>> Microsoft Access MVP 2007-2009
>> http://home.comcast.net/~cccsolutions/index.html
>>
>> "Find a job that you love... and you'll never work a day in your
>> life."
>>
>>
>> "Joe" <(E-Mail Removed)> wrote in message
>> news:F017DAC0-D5F2-4B77-8721-(E-Mail Removed)...
>> >I would like to set up a form containing a combo box with a list of
>> > mechanisms of injury. Some mechanisms have sub groups that I would
>> > like
>> > to
>> > have visible by means of linking them with a cascading combo box. Is it
>> > possible to have only some records from Cbo 1 link to Cbo 2? The
>> > examples
>> > I
>> > have seen to date show cascading data for all records in the first
>> > combo
>> > ie
>> > the city/state or postcode/suburb examples where every record has a sub
>> > record.
>> >
>> > Thanks for your help.
>> > --
>> > Joe

>>
>>
>> .
>>



 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      20th Apr 2010
On Mon, 19 Apr 2010 23:10:15 -0400, "Al Campagna" <(E-Mail Removed)>
wrote:

>Karl,
> I had in mind two colums in cbo1...
> Injury SubInjury
>
> AfterUpdate... is cbo1.Column(1) = Null then...
>
> OnCurrent... is cbo1.Column(1) = Null then...


One correction: Nothing - not even another NULL - is ever equal to NULL. These
comparisons will fail regardless of what's in Column(1). The correct syntax is

If IsNull(cbo1.Column(1)) Then...

--

John W. Vinson [MVP]
 
Reply With Quote
 
Al Campagna
Guest
Posts: n/a
 
      20th Apr 2010
John,
That was just aircode...
It was just an interpretation/representation of the logic.
Please... I would never actually code it like that...
Al

"John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message
news:(E-Mail Removed)...
> On Mon, 19 Apr 2010 23:10:15 -0400, "Al Campagna" <(E-Mail Removed)>
> wrote:
>
>>Karl,
>> I had in mind two colums in cbo1...
>> Injury SubInjury
>>
>> AfterUpdate... is cbo1.Column(1) = Null then...
>>
>> OnCurrent... is cbo1.Column(1) = Null then...

>
> One correction: Nothing - not even another NULL - is ever equal to NULL.
> These
> comparisons will fail regardless of what's in Column(1). The correct
> syntax is
>
> If IsNull(cbo1.Column(1)) Then...
>
> --
>
> John W. Vinson [MVP]



 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      20th Apr 2010
On Tue, 20 Apr 2010 10:22:48 -0400, "Al Campagna" <(E-Mail Removed)>
wrote:

>John,
> That was just aircode...
> It was just an interpretation/representation of the logic.
> Please... I would never actually code it like that...
> Al


I didn't think so... just wanted to warn the lurkers! "Even Jove nods..."
--

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cascading Combo Boxes (Multiple boxes) Adam Microsoft Access Forms 13 9th Jul 2008 07:47 PM
Cascading Combo Boxes--Problems Populating Boxes jerryb123 Microsoft Access 0 13th Jun 2008 03:11 PM
Cascading Combo Boxes - HELP PLEASE!!!!!! mikeinohio Microsoft Access 5 4th Jun 2008 09:02 AM
Cascading Combo Boxes John Floyd Microsoft Access Reports 1 7th Feb 2004 02:21 PM
Cascading Combo Boxes John Floyd Microsoft Access Reports 0 6th Feb 2004 01:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:26 AM.