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



 
 
Thread Tools Display Modes
  #1  
Old June 7th, 2004, 01:01 PM
Jason Wills
external usenet poster
 
Posts: n/a
Default Cascading Combo Boxes

Hi all,

Just figured out how to do cascading combo boxes (bit of a novice) however,
i would like to know if it is possible to do this over three or more combo
boxes - i have only done it with two, and can't get it to work with three,
if so, how?

thanx in advance

J


  #2  
Old June 7th, 2004, 01:36 PM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default Cascading Combo Boxes

Same principle.

The RowSource of the 3rd ComboBox should be a Parametrised Query with some
form of the value of the 2nd ComboBox being the Parameter value.

Use the AfterUpdate Event of the 2nd ComboBox to requery the 3rd ComboBox.

See The Access Web:

http://www.mvps.org/access/forms/frm0028.htm

--
HTH
Van T. Dinh
MVP (Access)




"Jason Wills" wrote in message
...
Hi all,

Just figured out how to do cascading combo boxes (bit of a novice)

however,
i would like to know if it is possible to do this over three or more combo
boxes - i have only done it with two, and can't get it to work with three,
if so, how?

thanx in advance

J




  #3  
Old June 7th, 2004, 02:16 PM
johny007
external usenet poster
 
Posts: n/a
Default Odpoveď: Cascading Combo Boxes

.... but try to do it in continuous form... it wont work.. i need exactly this solution... but without success
  #4  
Old June 7th, 2004, 02:52 PM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default Odpoved: Cascading Combo Boxes

More complex in ContinuousFormView since what you see is many instances of
the *same* ComboBox (and therefore only ONE RowSource) while you need
*different* RowSources for the different instances of the ComboBox.

A work-around is to use *two* ComboBoxes, says, "cboUnfiltered" and
"cboFiltered". Use an unfiltered RowSource for the cboUnfiltered (every
possible values in this RowSource) and use a filtered / parametrised
RowSource for the cboFiltered.

Size the 2 ComboBoxes to be exactly the same and bring cboUnfiltered in
front of cboFiltered. Use the cboUnFiltered_GotFocus Event to set the Focus
onto the cboFiltered.

This way, in the non-current rows (and the current row when the Focus is on
some other Control), the user will see the cboUnfiltered which will display
correctly (since all possible values are in the RowSource). As soon as the
user put the Focus into cboUnfiltered, the GotFocus Event will send the
Focus to the cboFiltered. This will make the cboFiltered visible and the
user can only select a value from the *filtered* list.

--
HTH
Van T. Dinh
MVP (Access)



"johny007" wrote in message
...
... but try to do it in continuous form... it wont work.. i need exactly

this solution... but without success


  #5  
Old June 7th, 2004, 03:01 PM
johny007
external usenet poster
 
Posts: n/a
Default Odpoveď: Odpoved: Cascading Combo Boxes

but in previuos "line" in cboFiltered item dissapeared ! i dont want it, i want to keep this "line" i want only use filtration for currect "line" ?
  #6  
Old June 7th, 2004, 03:34 PM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default Odpoved: Odpoved: Cascading Combo Boxes

In the "previous line", the cboFiltered is NOT visible since it it behind
the cboUnfiltered. The cboUnfiltered is visible and the cboUnfiltered
should display correctly since all possible values are in the RowSource of
the cboUnfiltered.

Please re-read my previous reply and test carefully ...

--
HTH
Van T. Dinh
MVP (Access)




"johny007" wrote in message
...
but in previuos "line" in cboFiltered item dissapeared ! i dont want it,

i want to keep this "line" i want only use filtration for currect "line" ?


 




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 02:01 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.