A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Cascading combo boxes - are they able to do this?



 
 
Thread Tools Display Modes
  #1  
Old April 19th, 2010, 03:14 AM posted to microsoft.public.access.forms
Joe
external usenet poster
 
Posts: 1,218
Default Cascading combo boxes - are they able to do this?

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
  #2  
Old April 19th, 2010, 03:41 AM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Cascading combo boxes - are they able to do this?

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" wrote in message
...
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



  #3  
Old April 19th, 2010, 09:27 PM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Cascading combo boxes - are they able to do this?

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" wrote in message
...
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



.

  #4  
Old April 20th, 2010, 04:10 AM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Cascading combo boxes - are they able to do this?

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" wrote in message
...
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" wrote in message
...
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



.



  #5  
Old April 20th, 2010, 06:04 AM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Cascading combo boxes - are they able to do this?

On Mon, 19 Apr 2010 23:10:15 -0400, "Al Campagna"
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]
  #6  
Old April 20th, 2010, 10:12 AM posted to microsoft.public.access.forms
Joe
external usenet poster
 
Posts: 1,218
Default Cascading combo boxes - are they able to do this?

Al, Karl, John - I really appreciate your input into my question. I now have
a couple of options to trial - I'll post back if any problems. Many thanks
again guys.
--
Joe


"John W. Vinson" wrote:

On Mon, 19 Apr 2010 23:10:15 -0400, "Al Campagna"
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]
.

  #7  
Old April 20th, 2010, 03:22 PM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Cascading combo boxes - are they able to do this?

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" wrote in message
...
On Mon, 19 Apr 2010 23:10:15 -0400, "Al Campagna"
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]



  #8  
Old April 20th, 2010, 04:44 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Cascading combo boxes - are they able to do this?

On Tue, 20 Apr 2010 10:22:48 -0400, "Al Campagna"
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]
 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.